How to extract words in Regular Expression action

  • 18 August 2020
  • 6 replies
  • 8 views

Badge +2

Hi Everyone,

Whats are the possible expressions to extract following data

 

<u>Date &amp; Time Quote Required Back : 24-08-2020 </u>   >>>> Get date['24-08-2020']

Has this been quoted previously? : No  >>>> Get word ['No']

<br/> Probability of winning quote (%) : 50  >>>> Get Number [50]

 

Note : I tried following, but its not working

 

8716i640472D86B400FCC.png

 

 

 

 

 

 

 

 

 

 

 

 

Thanks is advance

Shashika

 


6 replies

Userlevel 6
Badge +22

Hi,

 

I think it woul be simpler to just replace the text you dont need with blank text. I tested and it worked great.

8717iE60653B4073CF87B.png

Badge +2

Hi @SimonMuntz 

I'm getting the input from a email content (SharePoint plain text column)

Userlevel 6
Badge +22
Whether you pull the imput from a column or hard code it the extraction process is the same.

Are you just pulling in Time Quote Required Back : 24-08-2020
or are you pulling in <u>Date &amp; Time Quote Required Back : 24-08-2020 </u>
Badge +2

This is the sample email column 

 

need to extract the Date, Customer Name and winning quote (%)

 

<div class="ExternalClassC92F283FFFB647598431BD078702EC4F">
<div> Dear Team,
<h1>Please check the below details</h1>
<h4>
</h4>
<h4>
<u>Date &amp; Time Quote Required Back : 24-08-2020 </u></h4> Has this been quoted previously? : No
<br/>
<h3>
<u>Quote Details</u></h3> Test name : Qpac - Stage 7
<br/>
<br/> Customer name : Test Customer
<br/>
<br/> Customer acc no : 23
<br/>
<br/> Customer contact name : Test Name
<br/>
<br/> Customer email : test.test@test.com
<br/>
<br/> Quote phase (Urgent Action/Live Job/Tender) : Tender - If we need to delay the quote return date please advise
<br/>
<br/> Project Size : Medium Project
<br/>
<br/> Probability of winning quote (%) : 50
<br/>
<br/>
<h4>
<u>Margin/Pricing</u></h4> Switchboard components pricing(B1/B2/G1) : B1
<br/> Best Regards
<br/> Sales Team
</div>

Userlevel 6
Badge +22

Hi,

 

I had another look at this.

What I did was input all the HTML.

Then split it via the < character into a collection variable.

Then ran the collection variable through a For Each action looking for the part that you needed.

Once found I used another regular expression to trim out the unwanted text and just keep the date.

You could use the same concept to extract the other information you require.

Please see the sample workflow attached.

Badge +2

Hi @SimonMuntz 

Thanks for the prompt reply and the solution. This method dose the job for me. I had to use another regular expression inside the foreach action to remove special characters.

Reply