Hi all,
I’m trying to extract the value of field “Total” using Regex Pattern of “Matches” Activity.
Fields available :
Total $93.50
Sub Total $85.00
Pattern I gave :
(?<=Total)(.*)
Output I’m getting:

But I want to fetch only TOTAL value.
Any help would be appreciated:-)
Yoichi
(Yoichi)
3
Hi,
Can you try the following pattern?
(?<=(?<!Sub\s*)Total\s*)\$\d+
OR
(?<=(?<!Sub\s*)Total\s*\$)\d+
Regards,
This expression is not extracting any of the values.
It just started execution and ended.
Hello sir,
This expression is not fetching decimal values.
Yoichi
(Yoichi)
6
Hi,
Sorry, how about the following?
(?<=(?<!Sub\s*)Total\s*)\$[.,\d]+
OR
(?<=(?<!Sub\s*)Total\s*\$)[.,\d]+
Regards,
Thank you sir. It’s working perfectly.
Could you please share any link where I can learn regex.
Anil_G
(Anil Gorthi)
8
@Vaishnav_Tej
Please include like this
System.Text.RegularExpressions.Regex.Matches(str,"(?<=^Total.*)\d+\.\d+",RegexOptions.Multiline)(0)
cheers
1 Like
Actually I’m using Matches activity and inside pattern property I’m passing the expression.
Thanks for your response:-)
Anil_G
(Anil Gorthi)
10
@Vaishnav_Tej
Even there you have this option
cheers
oh Could you please share any link where I can learn about Regex ?
Yoichi
(Yoichi)
13
For now, the following might help you as first step.( However, this might be easy for you because you already know look behind.)
Regards,
system
(system)
Closed
14
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.