Hi all,
I have extra a particular data from a table. I have done screen scraping so i am getting the output from that.
The output looks something like this
Name: XYZ
A/C Date: 12-06-2022
Opening Bal.GBP 654,657.05
Closing Bal.GBP. 765,765.89
Balance. 654,76.90
From the above I want the amount which is Closing Bal.GBP that is I want to extract 765,765.89 .
How should I do this
lrtetala
(Lakshman Reddy)
3
Hi @hanviprebday
Try this
(?<=Closing\s+Bal.GBP.\s+).*
you can try this regex expression
System.Text.RegularExpressions.Regex.Match(input,"(?<=Closing Bal.GBP.)\s{0,}[0-9,.]+").Value.Trim
@hanviprebday
Try this
(?<=Closing Bal.GBP.\s).*
@hanviprebday
str=Name: XYZ
A/C Date: 12-06-2022
Opening Bal.GBP 654,657.05
Closing Bal.GBP. 765,765.89
Balance. 654,76.90
System.Text.RegularExpressions.Regex.Match(str,"(?<=Closing.Bal.GBP.\s)\s*([\d,]+\.\d{2})").Value
or
System.Text.RegularExpressions.Regex.Match(str,"(?<=Closing Bal.GBP.\s)\s*([\d,]+.[\d,]+)").Value
cheers…!
1 Like
Thank you all it’s working
system
(system)
Closed
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.