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?
How about the following?
System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Transmission Network Charge.*?\$)[\d,.]+").Value
(?<=Transmission Network Charge)(?:.*)(\$\d+.\d+)
thanks both, this works perfectly!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.