Extract decimals with Regex Split

Hi,

Can anyone advise me how to extract decimals in the first column? I used Regex Split and input
.([0-9].[0-9]+).* It didn’t seem to work, as the picture shows. I also tried ([0-9].[0-9]+). It worked for some rows, but not the others that don’t start with the decimal, like the second row.

Thanks in advance for your support.

Nora

Hi Nora

Use this regrex: (?<=\.)\d{2}
You can change the number inside the curly brackets for different accuracy.

GL,
Mehrdad

Thank you so much Mehrdad.

I got the number after the dot with your regrex. Could you please also advise me how to extract the whole number, including numbers before and after the dot? Thanks a lot.

Hi Nora,

I’m glad to hear it works for you.
Check this one : \d+.\d+
It will select the whole number including dot, e.g. 12.34

If you just want the numbers ,use this regex: \d+(?=.)\d+

GL,
Mehrdad

2 Likes

Thank you for your help~

2 Likes

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