Cannot get regular expressions to work in Column Filter

I’m rather new to KNIME and regex and obviously I am missing something.

I want to filter columns based on whether their name contains a string like “S1_1”, the column name being “S1_1abc_xyz”.

When I test the expression “.[0-9]_[0-9]” on it highlights “S1_1” in “S1_1abc_xyz” and that is what I want.

When I insert the expression in the Pattern field in the Column Filter node and tick “Regular expression” nothing happens. Wildcard or Type Selection work fine.

What can I do? Any help is appreciated!

And I am on Knime 4.1.2.

Hi and welcome. The regex must match the entire line - for example in these two screenshots:


Works perfectly, thanks a lot!

1 Like

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