Hi,
I got stuck with the following:
Imagine we have a string in stdout of a command that we would like to filter out:
Error123: some ‘thing’ (happened)
If we want to filter that out we would do something like
“{{ item.stderr.regex_replace(‘Error[0-9]+: some \‘thing\’ \(happened\)’, ‘’) }}”
However due to the fact that we have a colon, a single quote and brackets in our string I was unable to come up with the right escape sequence - whatever I tried, it always failed on one of these.
What would be the right way to escape these special character when they are also used in
the filter function like regex_replace?
Thanks!