Regex::Graph provides methods for displaying the results of regular expression matches using a "decorated" copy of the original string,with various format-specific display attributes used to indicate the portion of the string matched, substrings captured, and for global pattern matches, the position where the pattern will resume on the next match.
This module encapsulates a regular expression pattern and a string against which the pattern is to be matched.
The `regshell' program (included with this distribution) demonstrates the use of the ANSI formatter module, and provides a handy tool for testing regular expressions and displaying the results. Other format modules are in the works, including a module to output text with HTML/CSS embedded styles.
regshell includes support for readline and history, and can save/load pattern/string pairs to disk files for re-use.
NOTE: I have not been testing this code on win32. The regshell program is not strict about paying attention to which terminal attributes are set, so it may go braindead on win32. I'll pay more attention to win32 on the next revision.
Regexp::Graph version 0.01 (includes the `regshell' program) is available for download at http://dalnet-perl.org/converter/.
A screenshot of the regshell program is available on the web page.