I need to extract the below data from the attached text file.
Data : 158.75
pdf_text_file.txt (5.4 KB)
I need to extract the below data from the attached text file.
Data : 158.75
Hi,
Can you try the following expression?
System.Text.RegularExpressions.Regex.Match(strData,"(?<=TOTAL\s+AMOUNT\s+\(INCL\.\s+TAX\)\s+)[\d.,]+").Value
Regards,
Str_outRegex=System.Text.RegularExpressions.Regex.Match(Input,“Expression”).Value
You can give this Regex Expression in Find Matching Patterns:
(?<=TOTAL\sAMOUNT(.*)\s)[\d.]+
Use this syntax in Assign activity:
Matches= System.Text.RegularExpressions.Regex.Matches(yourstringinput,"(?<=TOTAL\sAMOUNT(.*)\s)[\d.]+")
Datatype of Matches is IEnumerable(System.Text.RegularExpressions.Match)
Print it in a message box by using below syntax:
Matches(0)
. This expression will extract an single value. If you have multiple values run a for each for matches.
Use this syntax in Assign activity. It will extract the first Matched value:
Matches= System.Text.RegularExpressions.Regex.Match(yourstringinput,"(?<=TOTAL\sAMOUNT(.*)\s)[\d.]+").Value
Datatype of Matches is String
Print it in a message box by using below syntax:
Matches.toString
Hope it helps!!
Try With this Expression
(Text.RegularExpressions.Regex.Matches(str,“(?<=Total Amount.*\s)\d+.+\d+”))(0).ToString
Try it
(?<=[A-Z]+\s*([A-Z]+.\s*[A-Z]+)\s*)\d+.\d+
Hey!Can u try it with this Regex Pattern
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.