Test, validate and match regular expressions
This regular expression matches Brazilian landline phone numbers with or without common formatting masks. It accommodates optional parentheses around the two-digit area code and optional spaces, validating both 7-digit and 8-digit local number formats. This is highly useful for form validations in applications targeting the Brazilian demographic, ensuring consistent data entry for contact information.