in reply to Re(2): Dot star okay, or not?
in thread Dot star okay, or not?

If you really want to get a good handle on how regular expressions work, try reading "Mastering Regular Expressions" by Jeffrey Friedl. Further, you can try the re pragma to see the regex engine at work:

use strict; use re 'debug'; my $string = 'abcdC'; print "Matched: $1\n" if $string =~ /((?<!b)[cC])/;

Try various strings and regexes and you'll begin to understand that output. The nice thing is that this will also show you some of the optimizations that the regex engine performs.

Cheers,
Ovid

Vote for paco!

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.