Regular Expressions 101

Sponsors

Library entries

0
pcre

php comment

no description available
Submitted by anonymous - 9 years ago
1
pcre

Parse drupal version info from filename

no description available
Submitted by Jason Smith - 9 years ago
-2
pcre

Match v4 IP address

no description available
Submitted by Budiony Damyanov - 9 years ago
-3
pcre

DateTime YYYY-MM-DD hh:mm:ss

no description available
Submitted by Madhan - 9 years ago
4
pcre

Hungarian ANDOK system id

no description available
Submitted by Tana - 9 years ago
6
pcre

ID003 device info

no description available
Submitted by sasjaq - 9 years ago
-2
pcre

[A-Z]+[a-z]{1,2}[0-9]*

no description available
Submitted by anonymous - 9 years ago
-2
pcre

A masz!

no description available
Submitted by Ja - 9 years ago
-2
pcre

failed attempt

no description available
Submitted by DynV - 9 years ago
1
pcre

Test Listing Parser

no description available
Submitted by anonymous - 9 years ago
-2
pcre

Ukazka

no description available
Submitted by anonymous - 9 years ago
2
pcre

Task 2, part 1

Finds all source numbers in square brackets
Submitted by Kovalev Evgeny - 9 years ago
4
pcre

Task 1

Finds a happy smile, except sad one
Submitted by Kovalev Evgeny - 9 years ago

Phone numbers matcher

Vote

1

Regular Expression
pcre

/
^ # begin \s*# some empty spaces (?: \+? # + symbol \d{1,2} # country code \s* (?(?=\)) # if followed by parens | # then dash not allowed -? # else optional dash ) )? #prefix like +380 \s* (?: (?P<leftparen>\()? # optional left paren \s* 0\d\d \s* (?(leftparen)\)|) # right paren if and only if left paren )? # operator code, starting with 0, optinally in parentheses (?(?<=\)) # if preceded by parens \s*| # then dash not allowed \s*-?\s* # else optional dash ) (?: \d | (?<= \d ) (?(sep) (?P=sep)| (?P<sep>[\-\/\ ]) ) (?= \d ) ){5,13} \s*# some empty spaces $ # end #\d\d\d (?P<separator>-?) \d\d (?P=separator) \d\d $
/
mgx

Description

Loading markdown...
Submitted by Oleksandr Sochka - 9 years ago