Test, validate and match regular expressions
Captures the middle digits of a phone number string, requiring exactly 2 digits before it (the Brazilian DDD area code) and exactly 4 digits after it. Designed for validating or extracting parts of Brazilian cellphone numbers in the DD NNNNN-NNNN format (e.g., 11 91234-5678). With global and multiline flags, it can process multiple numbers across lines, making it useful for formatting tasks like inserting hyphens.