Remove all characters until last number at beginning of string

Hi everyone!

Hoping someone could help me with the below question:

Lets say you have the following data:

Row 1: X123BLAH
Row 2: Y777TEST
Row 3: Q2224RIGHT

I want the resulting data to be:

Row 1: BLAH
Row 2: TEST
Row 3: RIGHT

Does anyone know how to remove all the characters before the last number? Hoping to use the string manipulation node.

Thanks!

Forgot to add, would not want to remove numbers following the first set of numbers then text:

Example data:

Row 1: X123BLAH77
Row 2: Y777TEST88
Row 3: Q2224RIGHT103

I want the resulting data to be:

Row 1: BLAH77
Row 2: TEST88
Row 3: RIGHT103

Hi KNIMEadventurer77 ,

you can use the string replacer node with regex

Something like the following regex should do it
^[A-Za-z]{0,}[0-9]{1,}
Replaceby nothing

So translated
match the following
^=beginning of string
followed by a character between A-Z (0 or more times)
followed by numbers at least 1 times or more

You can test your regex

*if there are non latin characters or special characters in your string you could improve the regex to:
^[^0-9]{0,}[0-9]{1,}

6 Likes

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