Linking Regx With Excel value

Thank once again, i turned a pdf file into a text file. The pattern you gave me works as it takes out all numbers in the file. This pattern : (?<=Subtotal\s)(.*?(?=\s)), only extracts numbers if the word Subtotal is infront. i’m looking for something like that which covers Total Amount Due, Total, Total Due all at the same time

I didn’t get you. You wanted to capture only numbers and currency symbols right??

That’s why I already asked, is that all the variations you have and you said “Yes”…

This is just an exampe, the number is highlighted because Subtotal is infront.

Im looking for a pattern to take a number only if Total Amount, Total or Total Due is in text, sorry if Im not making sense

@Mpumi_Setshedi - How about this?

Note: Case sensitive option has been checked…So if you are using matches use “Ignore Case” from the dropdown OR if you using the assign activity use “regexoptions.ignorecase”

1 Like

Prasath you are the best, thank you for your patience you have no idea.

1 Like

@Mpumi_Setshedi - Thanks…

Once you are done with your testing…Please mark my post as solution, so that others will benefit from that…

1 Like

Yes that what I was planning to do after testing

Hi Prasath, hope you doing well. I did some testing. The first part everything works fine.

The second part if it Total(space)ZAR(space)1234 pattern does not pick up
- If it is Total Amount R(space)(space)(space)(space)12345 pattern does not pick up

Third part Subtotal does pick up is fine. If it is SubTotal number gets picked up which I do not want, how do I avoid this

@Mpumi_Setshedi - Please check this…

For Subtotal and SubTotal I have already provided the given note…

See the below Case Insensitive needs to be selected…


Hi yes I was using subtotal as an example. Subtotal\SubTotal I do not need those values,everything else working 100%

I am not following you. Which one you exacly want and which one you want to Omit???

Just add that in the Regex and remove the case sensitive option.

This is the final version. Total Amount,Total, Total Due only.

Subtotal/SubTotal i want to omit.

@Mpumi_Setshedi - added the word boundary so that Subtotal values won’t be captured…

1 Like

Have marked as solution, thank you greatly

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.