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.
Thanks,
Thuan
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.
Thanks,
Thuan
@Thuan_Nguyen
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.
Good morning Thuan,
Please try the following RegEx pattern: \d{1},\d{3}.\d{3}
Feel free to test it out here: https://regex101.com/
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.