regex replace is used for patterns rather than fixed search strings.
Instead, you may simply use the replace function for your use case.
However, you have to transform the search string for __.
Please try this formula… replace($Extracted View$, "D:\\KNIME_0347_Bitterfeld\\DART\\2016\\034716TXW_", "")
also @bermq the problem in your regex is that \ is an escape character in a regex expression.
To actually check for \ as a character you need to escape the special character so \
*however it seems like it still does not work in the string manipulation node
With the string replacer it does work…not quite sure why there is an illegal escape sequence error in the string manipulation node for this
But with the normal String Replacer is works - strange
but as @tommy said if you just want to replace a fixed string replace is what you want (as regex is way slower then a simple replace in the execution)
Dear Tommy and AnotherFraudUser,
Many, many, many thanks for the quick reply.
I see the problem was the character “”, I would never solved it in my whole life
A last question about this: if I wanted to delete all the characters before “_”, how could I do it?
if you want to use the split node
^.{0,}W_(.{1,})$ should work
so translated
^=beginning of string
.=any character (expect new line)
{0,}=repeated 0 or more times
W_=followed by W_
(.{1,})=followed by any character repeated 1 or more times -> save as matching group the () are for that
$=end of string
it will only return a string if all requirements above are met and return each matching group as a new column
If you want to use the string replacer node (regex mode and match whole string)
Search string ^.*W_
ReplaceBy “”