Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-10-12 12:47
Flavor·ECMAScript (JavaScript)

/
<\?php((?:(?:(?!php)[^?]>|(?!php)[^?]|...\?[^?])*))\?>
/
g
Open regex in editor

Description

it's to use to get all <?php ?> tags. not easy to implement because some link in php with ? or > can make trouble to get the closure ?>

Submitted by simon