Rule-based Row Filter

It looks like MATCHES incorrectly processing “#” symbol.
MATCHES “.*[^#].*” => TRUE
does nothing.

will this work?

MATCHES “[^#]+” => TRUE

@armingrudd with your contributions :slight_smile:


Yes it works. Do you know my original is not working for # as it works for other symbols?

Hi @izaychik63,

The node and regex works fine. Here is why:

First, if you want to match a string containing no # character, you can use this regex:

[^#]+ or [^#]*

as @umutcankurt has suggested.

When you use
This is how it is interpreted:
any number of any character - a single character which can be anything other than # - any number of any character, So [^#] means ANY character other than #.
“1#2” is a match for .*[^#].* since first .* matches everything until the last character where [^#] matches 2 , the second .* matches nothing (0 number of any character) and the pattern is a true match.
But the opposite:
This matches any string containing #. The first .* matches anything until the last # character, [#] matches the last # character and the second .* matches everything afterwards. So if there is no match for [#] the pattern is not a true match.

Hope I could explain it well.



This behavior is the same for all characters.


I think Armin, who is an expert, can answer.

1 Like

Thanks @umutcankurt.

It seems you tend to be one of the top contributors in KNIME forum.

Good job!


1 Like

Thank you, Armin. I consider you one of the most comprehensive supporter on the forum.

1 Like

I learn thanks to you. :wink: :+1:

1 Like

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