Regular Expressions 101

Sponsors

Library entries

-2
pcre

JSON KEY VALUE

Get key value in json string
Submitted by Marcio Paiva Barbosa - 7 years ago
2
javascript

Vimeo Video ID

no description available
Submitted by anonymous - 7 years ago
1
javascript

YouTube Video PArser

no description available
Submitted by Shafique - 7 years ago
1
pcre

Разбор имен Валмакс RL

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

ddd

no description available
Submitted by anonymous - 7 years ago
1
python

DOS ASM Ops

Matches ops of DOS ASM
Submitted by anonymous - 7 years ago
1
pcre

Pure-Ftpd Log Action

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

YES!

no description available
Submitted by Nayan - 7 years ago
1
python

print_build_data

URL to get build data from the api
Submitted by anonymous - 7 years ago
1
pcre

decimal number validation

accepts 1; 1.1; 112315.23135
Submitted by MS - 7 years ago
0
javascript

two matches with pipe

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

redirect old links

no description available
Submitted by anonymous - 7 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