Skip to content

Instantly share code, notes, and snippets.

@trietptm
Created October 11, 2012 05:14
Show Gist options
  • Save trietptm/3870310 to your computer and use it in GitHub Desktop.
Save trietptm/3870310 to your computer and use it in GitHub Desktop.
PHP PCRE Regular expression for {tag}content content{/tag}{tag}content bla bla {/tag}
{tag}([^{]|({tag[^}])|({ta[^g].)|({t[^a]..)|({[^t]...)|([^{]tag})|(.[^t]ag})|(..[^a]g})|(...[^g]}))*{/tag}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment