Match activity regex

Hi, Iā€™m stuck with fiding a regex to extract the last number of the string below

Offshore B USD 0.42 3.72 1,151.308

What I would like to get is the number 1,151.308.

Any help will be much appreciated.


If the number you need is always the last one on the line you can use Split instead of regex.
num = myString.Split(" "c).Last splits the string by spaces and takes the last value, assigning ā€œ1,151.308ā€ to num.

1 Like

Good morning Thuan,

Please try the following RegEx pattern: \d{1},\d{3}.\d{3}

Feel free to test it out here:

1 Like

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