I need to parse regular expressions into their components in PHP. I have no problem creating the regular expressions or executing them, but I want to display information about t
You may be interested in a project I did last summer. It is a Javascript program which provides dynamic syntax highlighting of PCRE compatible regular expressions:
See: Dynamic (?:Regex Highlighting)++ with Javascript!
and the associated tester page
and the GitHub project page
The code uses (Javascript) regex to pick apart a (PCRE) regex into its various parts and applies markup to allow the user to mouse over various components and see the matching brackets and capture group numbers.
(I wrote it using regex because I didn't know any better! 8^)