Here is a string I have to test regex patterns that remove control characters.
AAU?Aasddsaustw3h,kdf134dfswdesdfent?�sdfsadfa45678r?w3h,kdf134dfswdesdfawh,kdf134dfswdesdfsurew3h,kdf134dfswdesdfent??3asdfliit/123423defwecty ?�STasd?Pawh,kdf134dfswdesdfks?Hw3rsdfsd134dfswdet
It seems regex pattern "[[:cntrl:]]"
works well.
string.replaceAll("[\u0000-\u001f]", "")
just replace part of them.
"\p{Cntrl}"
just replace empty string after "wecty".
Can anyone told me what's those control characters are? I can replace them but could not figure out what are they.
The jave online regex test show there are 11 control characters matched.
https://www.freeformatter.com/java-regex-tester.html#ad-output