Regex not match

Hello,

I have these strings:
Global Adjustment 339,987.067 kWh @ $0.08734 $29,694.47
Global Adjustment 37,776.341 kWh @ $0.05519 $2,084.88
377,763.408 kWh @ $0.04699 $17,751.10

where I need to match only the lines that don’t start with “Global Adjustment”, in this case only capture 17,751.10. How should I modify the expression
[\d.,]+\skWh\s@\s$[\d.,]+\s$([\d.,]+)
so it won’t match the first two lines. Thanks!

Hi,

Can you try the following pattern?

(?<=\n)[\d.,]+\skWh\s@\s\$[\d.,]+\s\$([\d.,]+)

Regards,

Works like a charm!! thank you so much again!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.