Split Characters & Numbers

Hi everyone,

I have some data in one column that is in the following form:

ABC00001
ABC02485
ABC03713
ABC02949
ABC03235

I am trying to delete the rows that have numbers whose last 2 digits are less than or equal to 20. So, in the above example, row 1 and row 3 would be deleted. Can anyone help me with this?
I figured the best way is to first split the letters from the digits, then do the “<=20” test, then remove those rows, then put the letters and numbers back together. I’m still quite new to knime, so if anyone has a better way or can help me do this, it would be much appreciated!

Hi @Danny_Sigesmund

There are community members here who can do it with probably just one node using Regexsplit or something to that effect.

Here’s a slightly longer way to do it, since I don’t have knowledge with Regex much:

Split the last two digits.knwf (29.5 KB)

Hope it still helps.

3 Likes

hi @Danny_Sigesmund ,
as @badger101 pointed out, you can use a Rule-based Row Filter with a regex

$column$ MATCHES "^.+?([0-1][0-9]|20)$" => FALSE
TRUE => TRUE
5 Likes

Touche :grin:

Nice! @duristef

2 Likes

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