I need to remove numbers at the end of a string after the last underscore. However, the text before the last underscore can also contain numbers, which need to remain. So a simple replace all numbers won’t work. In the list of values below I only want to remove the numbers at the end.
As you can see the amount of characters before the numbers differs per line. Also the amount of numbers at the end can differ (from 1 - 4 numbers). And some lines don’t have numbers at the end. And some lines have a different amount of underscores.
I think this has to be done using regex, but I’m not knowledgeable enough on this
The first line should look like this:
AEV_Z_EXRP_O2C_O
You don’t need regex. You can accomplish this with a String Manipulation (reverse function) and a Cell Splitter node. reverse_split.knwf (21.0 KB)
gr. Hans
I made with just one node that you need to use 3. For performance, it’s better way to use less memory and process with less steps. Can be more complex for someone, but have benefits at all.
it’s nice to see some examples here to build a huge repository of ideas.