private String cleanupPersonalString(String text) { if (text == null) { return null; } text = text.trim(); final Matcher m = _QUOTED_STRING_WO_CFWS_PATTERN.matcher(text); if (!m.matches()) { return text; } text = removeAnyBounding('"', '"', m.group()); text = ESCAPED_BSLASH_PATTERN.matcher(text).replaceAll("\\\\"); text = ESCAPED_QUOTE_PATTERN.matcher(text).replaceAll("\""); return text.trim(); }
if (personalString == null && EXTRACT_CFWS_PERSONAL_NAMES) { personalString = m.group(9); personalString = removeAnyBounding('(', ')', getFirstComment(personalString)); personalString = removeAnyBounding('(', ')', getFirstComment(personalString)); if (personalString == null && EXTRACT_CFWS_PERSONAL_NAMES) { personalString = m.group(8); personalString = removeAnyBounding('(', ')', getFirstComment(personalString)); personalString = removeAnyBounding('(', ')', getFirstComment(personalString)); personalString = removeAnyBounding('(', ')', getFirstComment(personalString)); final String testAddr = removeAnyBounding('"', '"', currentLocalpart) + "@" + currentDomainpart; currentLocalpart = removeAnyBounding('"', '"', currentLocalpart);
private String cleanupPersonalString(String text) { if (text == null) { return null; } text = text.trim(); final Matcher m = _QUOTED_STRING_WO_CFWS_PATTERN.matcher(text); if (!m.matches()) { return text; } text = removeAnyBounding('"', '"', m.group()); text = ESCAPED_BSLASH_PATTERN.matcher(text).replaceAll("\\\\"); text = ESCAPED_QUOTE_PATTERN.matcher(text).replaceAll("\""); return text.trim(); }
if (personalString == null && EXTRACT_CFWS_PERSONAL_NAMES) { personalString = m.group(9); personalString = removeAnyBounding('(', ')', getFirstComment(personalString)); personalString = removeAnyBounding('(', ')', getFirstComment(personalString)); if (personalString == null && EXTRACT_CFWS_PERSONAL_NAMES) { personalString = m.group(8); personalString = removeAnyBounding('(', ')', getFirstComment(personalString)); personalString = removeAnyBounding('(', ')', getFirstComment(personalString)); personalString = removeAnyBounding('(', ')', getFirstComment(personalString)); final String testAddr = removeAnyBounding('"', '"', currentLocalpart) + "@" + currentDomainpart; currentLocalpart = removeAnyBounding('"', '"', currentLocalpart);