Hi,
I need to get rid of trailing repeating non_alphanumeric symbols like
"thanks ! !!!!!!!"
to "thanks !"
If these different symbols then they are ignored.
I quite new to regex, so I came up with
regexp_replace('Thanks . . . . ', '((\\W)\\s*)(\\2\\s*)+', '\\2')
to try it out.
However i realise the trailing space after 'thanks' causes some problem. I would get back "thanks "
instead of "thanks ."
This is kinda strange because I used an online regex tool and the first whitespace was not matched. Can anyone help?
note: I did insert the double backslash.