Test, validate and match regular expressions
Validates Brazilian cellphone numbers consisting of a 2-digit area code (DDD) followed by either 9 digits starting with 8-9 (modern mobile format, e.g., 11987654321) or 8 digits starting with 1-7 (legacy format). It matches unformatted 10 or 11-digit numbers within word boundaries. With the global flag, it can find all phone numbers in a text, useful for validation or extraction in Brazilian applications.