Need Regex for Below these string in C# language

Hi team,

anyone help me in these string I need one value

String =“Document 100018414 1510 was parked”

need output -100018414

thank you in advance

don’t post screen shot please post regex in C# language

Regards
Saikrishna

Hi @Mada_Sai_Krishna

You can try this C#

Input="Document 100018414 1510 was parked"
Regex=System.Text.RegularExpressions.Regex.Match(Input, @"(?<=Document )\d+(?=\s+)").ToString();

Hope this helps!!

Let’s take like u have saved this input to a string variable named Strinput

strinput = “Document 100018414 1510 was parked”

Use assign activity like this with Regex method to get the required output

Stroutput = System.Text.RegularExpressions.Regex.Match(Strinput.ToString, “(?<=Document\s).*(?=\s\d)”).Value

Hope this helps

Cheers @Mada_Sai_Krishna

@Mada_Sai_Krishna

Input:

String =“Document 100018414 1510 was parked”

Regex: (ruby)

(?<=Document\s)\d+

Output:

image

Hi,

How about the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,@"\d+").Value

image

Regards,