regex filtering for specific character lengths

Hi, I am trying to simply filter columns with names with a specific range of character lengths.
I have been trying ^[a-z,A-Z,0-9]{0,10}$ to include columns with names <= 10 characters.
This was based on a visit to Regex101 and Stack Overflow, but this doesn’t appear to work in knime.
Any suggestions?

Hi @0nly4phil

What’s the configuration of your column filter and what are your columns like? If could be that the regex pattern itself is not suitable for your use case. If I apply ^[a-z,A-Z,0-9]{0,10}$ it’s picking up the correct column.

Hi and thanks!
Some of my column names have “_” characters, and I am not able to pick these up the filter I was using.

The explanation on Regex101 can help you out here:

As per the explanation, you are only looking at numbers and letters and an individual comma. Upon second look, you also do not need the multiple comma’s. It just counts as one character. If you use this one it will also account for underscores.



1 Like

That’s great. Many thanks!

1 Like

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