Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Donate
Info
Regex Editor
Community Patterns
Account
Regex Quiz
Settings
Order By
Most Recent
Highest Score
Lowest Score
Most upvotes
Most downvotes
Filter by Flavor
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET 7.0 (C#)
Rust
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 12,020 community submitted regex patterns...
0
Array to stdClass
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
select everything in brackets
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
mach url
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
another test on bpa
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
test with \w
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
final-version
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
Toutes les chaînes qqueChoseDao. sauf la chaîne acteMedicalDao
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
date
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
Stripping all but a list of several prefixes
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
Match list of prefixes
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
golang const|func|type declaration matcher
PCRE (PHP <7.3)
Intended for commenting out a source file in a more targeted/formatted manner—makes folding and navigation easiers while annotating (substitution is wrapping each statement in block comments.)
Submitted by
anonymous
-
5 years ago
0
ffpmeg process
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
bsb: titels
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
bsb: titels - contemporaine
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
bsb: lijsten
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
AddBracketsXMLToJSONIssueOnSubElements
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
programs/films
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
4位小数校验
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
Advent of Code Day 12
PCRE (PHP <7.3)
Parses 3d coordinates for getting Position and Velocity http://adventofcode.com/day/12
Submitted by
Andrew Hoffmann
-
5 years ago
0
nested if..elsif..else..endif
PCRE (PHP <7.3)
catchs multiple elsifs in the only elsif group take care of keywords in comments, mask out them first
Submitted by
anonymous
-
5 years ago
1
...
209
210
211
212
213
...
601
Regex de validação de número celular e fixo | PHP (PCRE2)
1
Regular Expression
PCRE2 (PHP >=7.3)
/
^
(
(?#DDI)
(
\+
|
00
|
\+
00
)?
[
\s
\-\.
]
?
(
\(
?
[
5
]
{2}
\)
?
)?
)?
[
\s
\-\.
]
?
(
(?#DDD)
\(
?
0
?
(
[
1
-
9
]
{2}
)
\)
?
)
[
\s
\-\.
]
?
(
(?#Dígito)
9
)?
[
\s
\-\.
]
?
(
(?#Número)
(
(?#Primeira
Parte)
[
1
-
9
]
[
0
-
9
]
{3}
)
[
\s
\-\.
]
?
(
(?#Segunda
Parte)
[
0
-
9
]
{4}
)
)
\s
?
$
/
gm
Open regex in editor
Description
Regex validação número celular e fixo
Somente números nacionais
Com ou sem DDI 55
(com ou sem + e/ou 00)
DDD obrigatório
(com ou sem parênteses)
Com ou sem Dígito 9
Com ou sem espaços vazios, hífens ou pontos entre os capture groups
Substitui pelos capture groups mantendo somente os números no padrão abaixo
DDI+DDD+DÍGITO+NÚMERO = 552198887777
Submitted by
Danillo Dantas
-
2 years ago