Hello I have the following texts where I need to capture the last number 899.48, 238.84, 5111.87
Wholesale Market Service Charge reflecting electricity consumed before and 321,242.175 kWh at $0.0039 per kWh 899.48
Wholesale Market Service Charge or close your Toronto Hydro services is online. 711,242.175 kWh at $0.0039 per kWh 238.84
Wholesale Market Service Charge Are you moving? The fastest way to set up tra 601,242.175 kWh at $0.0039 per kWh 5,111.87
basically anything could be in between “Wholesale Market Service Charge” and the number of kWh (the bold part), the number of kwh will always be at the beginning of the second line. I need to match this way because there are other instances of this format: 711,242.175 kWh at $0.0039 per kWh 238.84 and I need to capture only the Wholesale Market Service Charge.
the regex I have now isn’t working:
(?<=Wholesale Market Service Charge )(?:.*\r?\n[\d,.]+\skWh\sat\s$[\d,.]+\sper\skWh )([\d,.]+)
can someone please help?