There is a regex and I need to find the character not matching the regex. Then replace the character with "" in. How to achieve this in JAVA?
Pattern : ^((?![\|\=\;])[\p{L}\p{N}\p{M}\p{P}\p{Zs}])+$
Sample Text: HAIRCUT $42 PER PERSON
Required output: HAIRCUT 42 PER PERSON