XXXXXX y XXXXXX y
So this is my value of a field z . How to replace this with XXXXXX y.
Below is not working
rex mode=sed field=z "s/XXXXXX y XXXXXX y/XXXXXX y/g"
rex mode=sed field=z "s/(XXXXXX\s+y)\s+XXXXXX\s+y/\1/g"
the \s+ should grab tabs and whitespace. The parens
() and \1 will make the first part of that string a capture group, and use what is captured as the replacement.
i tried this it seems to be working-
| makeresults |eval z="XXXXXX y XXXXXX y"|rex mode=sed field=z "s/XXXXXX y XXXXXX y/XXXXXX y/g"
what is expected output ..can you provide some details..