Code:
{
String correctPropertyDetail = "Los Angeles 4 Rose St 7 br h $350,000 J M&C Bunker Hill";
String incorrectPropertyDetail = "Los Angeles 4 Rose St S 7 br h $350,000 J M&C Bunker Hill";
Pattern pattern1 = Pattern.compile("\\A[A-Z][a-z]*|[A-Z][a-z]* [A-Z][a-z]* [A-Z]?[0-9]{0,4}/?[0-9]{0,4}-?[0-9]{0,4}|[0-9]{0,4}[a-z] [A-Z][a-z]* [A-Z][a-z]* (?:St|Rd|Av|Sq|Cl|Pl|Cr|Dr|La) [0-9] br [hut] \\$([0-9]){0,3},([0-9]){0,3}|\\$([0-9]){0,3},([0-9]){0,3},([0-9]){0,3} ([A-Z][a-z]*){1,}\\Z");
Pattern pattern2 = Pattern.compile("\\A\\b[A-Z][a-z]*\\b|\\b[A-Z][a-z]* [A-Z][a-z]*\\b \\b[A-Z]?[0-9]{0,4}/?[0-9]{0,4}-?[0-9]{0,4}\\b|\\b[0-9]{0,4}[a-z]\\b \\b[A-Z][a-z]*\\b \\b[A-Z][a-z]*\\b \\bSt|Rd|Av|Sq|Cl|Pl|Cr|Dr|La)\\b \\b[0-9]\\b \\bbr\\b \\b[hut]\\b \\$([0-9]){0,3},([0-9]){0,3}|\\$([0-9]){0,3},([0-9]){0,3},([0-9]){0,3} ([A-Z][a-z]*){1,}\\Z");
Pattern pattern3 = Pattern.compile("\\A(?:[A-Z][a-z]*|[A-Z][a-z]* [A-Z][a-z]*) (?:[A-Z]?[0-9]{0,4}/?[0-9]{0,4}-?[0-9]{0,4}|[0-9]{0,4}[a-z]) [A-Z][a-z]* [A-Z][a-z]* \\b(?:St|Rd|Av|Sq|Cl|Pl|Cr|Dr|La)\\b \\b[0-9]\\b br [hut] \\$([0-9]){0,3},([0-9]){0,3}|\\$([0-9]){0,3},([0-9]){0,3},([0-9]){0,3} ([A-Z][a-z]*){1,}\\Z");
Matcher matcher = pattern.matcher(propertyDetail);
if (matcher.find())
System.out.println("Property detail is " + propertyDetail);
}