Brazilian Phone Number
intermediateMatches Brazilian phone numbers with DDD area codes.
phonebrazilvalidation
Pattern
/(?:\+55[\s-]?)?\(?\d{2}\)?[\s-]?9?\d{4}[\s-]?\d{4}/gTry It
0 of 6 strings matched
Explanation
Matches Brazilian phone numbers with optional +55 country code, 2-digit DDD area code (optional parentheses), optional 9 prefix for mobile, and 8 digits.
Test Strings
Matching
- +55 11 91234-5678
- (11) 91234-5678
- 11 1234-5678
Non-matching
- +1-555-1234
- 12345
- abc
Language Compatibility
| Language | Support |
|---|---|
| JS | Full support |
| PYTHON | Full support |
| JAVA | Full support |
| PHP | Full support |
| GO | Full support |
Code Snippets
const regex = /(?:\+55[\s-]?)?\(?\d{2}\)?[\s-]?9?\d{4}[\s-]?\d{4}/g;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);