Need help with string maniputation

Below are my string examples and the results that I am looking to get.

String 1:
Code 6300181494

String 2:
Code 6300181427 Region VD01 / PBSM22

String 3:
Test 1 / 1 19286849 / 08.01.2020 525902 3100292135 VD01

String 4:
Test 1 / 1 1928475639 / 08.01.2020 5847295764 3100292135 VD01

String 5:
Test 1 / 1 1928475639 / 08.01.2020 584729576412 310029213512 VD01

Here are the results that I want for these examples:

String 1 result: 6300181494

String 2 result: 6300181427

String 3 result: 3100292135

String 4 result: 3100292135

String 5 result: 310029213512

Originally, I thought this number would always be 10 digits, but now I see they could be more than 10 digits. Also, the other numbers in the strings could also match the same length as that number that I want to get.

Any idea?

If theses strings are stored Ina string variable then for each string passes as input to a variable named strinput use this assign activity to get the value you want

Stroutput = System.Text.RegularExpressions.Regex.Match(strinput.ToString,

This same expression can be used for all strings you have mentioned as sample

Cheers @skyblue1854

Thanks so much! I will try it out now and report back to you.

1 Like

It looks like it works for the first two string examples. But example 3 to 5 shows an empty result.

1 Like

But when I tried wth same expression it was giving me the output
Like this

Cheers @skyblue1854