Check a string in a cell

Hello,

Anyone can help me on the node or function that checks if a cell contains a string or not.
Example, in “1X234567” - true,
“12345678” - false
“1234567A” - true

thank you!

Hi @melvinp and welcome to the KNIME community forum,

You can use the Rule Engine node with “LIKE” or “MATCHES” functions.

Give it a try and in case of further quesitons, feel free to ask.

1 Like

Hi, thank you for the suggestion,
i tried this function $Column 1$ LIKE “A in rule engine node - but it only applies a specific match for “A”. I need a function that can work for [A-Z]. Thank you!

Hi, i got it already, i used regexMatcher. thank you!

2 Likes

With “LIKE” you can use wildcard and with “MATCHES” function you can use Regex to define a pattern.

3 Likes

Hello @melvinp ,
You can use the String Manipulation node with the expression

regexMatcher($Name$, “.[A-Za-z].”)

to check if a cell in the ‘Name’ column contains any alphabetical character (A-Z or a-z).

2 Likes