Hello, the sample text:
“Transmission Network Charge 188.784 kW @ $674.68 2022.”
there can be anything after 674.68, not necessarily 2022 (and there will be other text after 2022 as well)
I need to capture 674.68
the existing expression
(?<=Transmission Network Charge)(?:.* $?)([\d,.]+)
captures 2022 instead. can someone please help?
Yoichi
(Yoichi)
2
Hi,
How about the following?
System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Transmission Network Charge.*?\$)[\d,.]+").Value
Regards,
Anil_G
(Anil G)
3
Hi @lynnsong986
Try this
(?<=Transmission Network Charge)(?:.*)(\$\d+.\d+)
Happy Automation
Cheers
thanks both, this works perfectly!
Lynn
1 Like
system
(system)
Closed
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.