String Replacer - Why do my regex commands not work?

Hello!

I'd like to use the String Replacer Node to remove the content of every cell that starts with anything except a number. My idea was to use the expression ^[^0-9] or ^[^0-9].* inside the "Pattern" field but neither of them works. Then I tried some simpler regex expressions but whatever I try nothing happens.

Is there something else I have to consider for regex expressions to work here that I'm overlooking?

 

Greetings

Hi,

The String Replacer node will only work with the "whole string" setting, not with "all occurences". Could that be the issue?

There's also the String Manipulation node which offers some additional Regex capabilities, which may or may not differ from the "String Replacer" node's - I'm not quite sure to be honest, as I use this quite infrequently.

HTH,
E

Hey,

I tried "whole string" setting before but that doesn't work.

I haven't noticed the regex methods in String Manipulation before. It works better than String Replacer for me, however I cannot find out how to replace the whole String if ^[^0-9].* is true (the string contains multiple lines and apparently only the first line is replaced by "").

^[^0-9].* works for me. Did you change the mode from "Wildcard pattern" to "Regular expression"?

I tried both wildcard pattern and regular expression. I guess the issue is that my cells contain multiple lines (However, I tried other cells with single lines and my regex was still not accepted?)

I solved this problem now by using String Manipulation Node with the following expression: regexReplace($column$,"^[^0-9](.|\n|\r)*","")