Hi we have a pattern applied and characters replaced, could you please let us know what charecters are replaced with this below regex. It is getting hard to get to know. I wanted the list of characters as the regEx applied here. Need help!! Please find below sample:
private String testRegEx(String myStr) {
String regex = "[^\\s\\p{L}\\p{N}']|(?<=(^|\\s))'|'(?=($|\\s))";
Pattern pattern = Pattern.compile(regex);
if(StringUtils.isNotEmpty(myStr)) {
String firstString = myStr.replaceAll("\\r|\\n\"\'\"", "").replace("~^1~^", "").replaceAll("\\*", "").replaceAll("\\.", "");
String res = pattern.matcher(firstString).replaceAll("");
return StringUtils.normalizeSpace(res);
} else {
return StringUtils.EMPTY;
}
}