Replace the charackter Questionmark in a string

Hey,

i exported a big CSV file and i need to remove a lot of Rows where the strings contain a URL with a “?”.
KNIME interprets the questionmark as wild card so i dont know how i can select the charakter “?”

2023-07-08_21h27_50

Sadly the charakters after the questionmark arent always the same pattern

would really apreciate your help

Hi @LemonG Welcome to KNIME Forum

You can use a String Mainpulation node with:
replace($column1$, "\?" ,"" )
to replace the question mark, (the backslash is a so called ‘escape’ character) with something between “”.
gr. Hans

2 Likes

Hi @HansS,

thank you very much, this really helped me out.

As I understand this only functions with the string manipulator node, i couldnt use it in the row filter node or did i do something wrong?

greetings

Hi @LemonG,
you can use a regular expression in the Row Filter node to identify any text with a question mark. I think something like .*\?.* should work as a pattern (any number of any character before and after the questionmark), but please check if it really provides the expected behaviour.

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