REGEX match for numeric value OR null value

Hi all,

I’m very new to REGEX. I’m trying to filter out rows based on if a column (string) matches a numeric value or is null.

Based on some googling, I’ve tried:


In both cases, the null values end up not being included in the match. Any suggestions on what I’m doing wrong?


Hi @davidbaker

If you say if a value is null, do you mean a data null (a ? in KNIME) or the text “null”? Your Regex suggests the latter.


If you want to filter out a data null, I would go for a Rule-Based Row Filter in this case. It’s a bit easier to manage.

MISSING $column1$ OR $column1$ MATCHES "\b\d+\b" => TRUE

For string null it would be $column1$ = "null" OR $column1$ MATCHES "\b\d+\b" => TRUE


Thank you @ArjenEX, that worked like a charm! And you were correct, I did mean ? in Knime.


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