Regular Expressions 101

Sponsors

Library entries

-166
pcre

gfdgfsdgsfdg

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

link

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

ddasgfsfds

no description available
Submitted by fs - 9 years ago
-35
pcre

E-mail validation regex

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

your mom

aasdf
Submitted by your mom - 8 years ago
-22
pcre

г.москва

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

dd-mm-YYYY HH:mm:ss (year range 1000-2999)

no description available
Submitted by Ka. - 10 years ago
-10
pcre

need help

no description available
Submitted by sachin - 9 years ago
-9
pcre

test

no description available
Submitted by test - 9 years ago
-8
pcre

Regular exp to exclude a domain

to exclude one domain abc.com
Submitted by Sandy - 10 years ago
-7
pcre

hi

no description available
Submitted by asf - 8 years ago
-4
pcre

Twitter hashtags extractor

Extract hashtags from text
Submitted by anonymous - 9 years ago
-4
pcre

For telephone

This is for telephone pattern +1 123-123-1234
Submitted by kevin - 7 years ago
-4
pcre

IP Address Validation

List of possible IPs
Submitted by Paolo Carrasco - 7 years ago
-3
pcre

Browser regex

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

test2

no description available
Submitted by anonymous - 9 years ago

remove comments from php code

Vote

10

Regular Expression
pcre

@
(?(DEFINE) (?<next_open_tag> [^<]*+ (?i: <++[^<?s][^<]* | <++(?! \?php | \?= | script\s*language\s*=\s*([\'"]?)php\g{-1}\s*> ) [^<]* )*+ (?i: <++(?: \?php | \?= | [^>]+ ) | \z ) ) ) \A (?&next_open_tag) \K | [^'"`/#<?]*+ (?: '(?:[^'\\]+|\\.)*+' [^\'"`/#<?]* | "(?:[^"\\]+|\\.)*+" [^\'"`/#<?]* | `(?:[^`\\]+|\\.)*+` [^\'"`/#<?]* | /(?![/*]) [^\'"`/#<?]* # stop for // or /* | # if close tag ?> \? (?: >(?&next_open_tag)[^\'"`/#<?]* | ) | < (?: # heredoc or nowdoc <<[\ \t]*([\'"]?) ([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*) \g{-2}[\ \t]*[\r\n] (?-s:.*+[\r\n])*? \g{-1}[\r\n;] [^\'"`/#<?]* | (?i: /script\s*>) (?&next_open_tag) [^\'"`/#<?]* | [^\'"`/#<?]* ) )*+ \K (?: (?://|\#)(?:[^\n?]+|\?(?!>))*+ # single line comment // и # | /\*(?:[^*]+|\*(?!/))*+\*/ # multi line comment /* */ )?
@
xsg

Description

Loading markdown...
Submitted by anonymous - 8 years ago