Regex to extract the last amount including the negative

Current regex :
[0-9,.]+

Sample input :
usa - Company Distribution -144.64
ph - Company Distribution 244.64

output :
-144.64
244.64

thanks

give a try on following:
(?<=Company Distribution )(\-?[\d,.]+)
grafik

1 Like

how do we include the comma @ppr ? also include the dot

for example
usa - Company Distribution -21,713.36

output : -21,713.36

its already included:
grafik

you can test / develop regex e.g. with regex101.com

Also have a look here:

2 Likes

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