Replacing a * or ?

Without resorting to snippet nodes. Are there plans to allow a string replacement of a * or ? For other text using the string replacer node.



Yes, but we need to create a new node since the current replacer treats * and ? as special characters and we don't want to change the behaviour of existing nodes. It's on the list.

Agreed. Wouldn't want change behaviour if the existing node, but its certainly an unmet need to replace these characters in a cell. 




I knew about this special treatment, but I just found one particular part of that behaviour that I classify as a bug.

Namely, when I select "all occurences" and "Regular Expression", stars are still considered an error. On the surface, that seems correct, but:

- "\*", that is an escaped star, also triggers this error. It shouldn't. The same goes for the lazy "a*?" matcher.

- I can still say things like "(a+)?" or "a{0,}", which are aquivalent to "a*". And sometimes they are necessary, because the regex-star is more restrictive than the wildcard-star.

The simplest solution would be to not check for stars if "Regular Expression" is selected. As the configuration in the first case is currently not accepted, changing that should not mess up old Workflows, but allow for star-replacements. Also, if the pattern is wrong, it's not your fault.

Until then, Snippets...

It may not be our fault, but most users blaim us if they don't fully understand all depths of regular expressions. I changed the '*' check so that escaped stars in regular expression are now recognized as such and not reported as an error. Will be available in 2.11.

I hope you mean it's not reported as an error anymore. ;)

I see your point about blaming you... well, seems to be a good solution to filter stars, then. If you use a workaround, you probably have a good reason, and you probably also have a deeper understanding of regex.

Yes, "not"...

The problem with the "*" in a regular expression with "replace all" is that "a*" (for example) matches at every single position in the string. So for example replacing all occurrences of "a*" in "abcd" with "X" results in "XXbXcXdX". This is certainly correct, but in 99.99% of all cases it's not what you want and for non-experts it looks like a strange bug.