Regex teaser

Mark Fowler mark at
Wed Dec 4 01:03:57 GMT 2013

On Tue, Dec 3, 2013 at 6:54 PM, Paul Makepeace <paulm at> wrote:

> $ perl -le '($a = "aabbb") =~ s/b*$/c/g; print $a'

This is where tools like Regexp::Debugger shine.  Running

 perl -le 'use Regexp::Debugger; ($a = "aabbb") =~ s/b*$/c/g; print $a'

Shows exactly why it gives the output it does (if you hit "n" for next a lot)


More information about the mailing list