How to extract only number from a string

Hi Everyone,

I have to extract only number from a string. The string is provided below:

Abcde 123456 abcfjggh89

Number to extract - 123456

Please help me to achieve this.

Thankyou

@garima.sriv12

\d{5,}
System.Text.RegularExpressions.Regex.Match(Str,"\d{5,}").Value

Hi @garima.sriv12

\d{3,}

Hi @garima.sriv12

Assign -> Input = "Abcde 123456 abcfjggh89"

Assign -> Output = System.Text.RegularExpressions.Regex.Match(Input,"(?<=\w+\s+)\d+").Value.Trim()

Output
image

Regards

Hello @garima.sriv12

Take a look here if you want to learn how to use regex:

Cheers
Steve

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