Get text from first number in string

Hi,

I’m trying to get the text in a string from the first number in that string.
For example:

asdasdas 12
aerggsf 12-A
powejkasd 124 B

Can anyone tell me how I can extract text (12, 12-A, 124 B) from the strings?
Thanks!

2 Likes

hey @JanWillem

Hope you are doing well

You can use Matches activity for this and pass this patter \d.+

image

Cheers
@JanWillem

2 Likes

Hi @JanWillem,

try this
Split(your string,” “)(1).ToString
Cheers,
Timo

1 Like

Use following regex pattern in Matches activity
\d(.*)$

1 Like

above pattern will fail to identify “aerggsf 1”
Correct regex will be: \d(.*)

1 Like

Thanks! This works for me.

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