
That expression expands as:macawgumbo wrote:what exactly would /^(?:(d+)|::)* equate to if you say would including it in a grep statement?

Sure, but he didn't say it had to be useful.frostschutz wrote:...and this grep is pretty much pointless (unless you're using color grep or something), as it returns every line. Every line has a beginning of the line, and it contains ((d+)|::) at least zero times.
"Mastering Regular Expressions: Powerful Techniques for Perl and Other Tools" by Jeffrey E. F. Friedl is very good too.nutbar wrote:If you want to begin to really understand regular expressions, I suggest you start with basic RE's by reading the regex man page (which also covers extended RE's as well). Once you have a firm grasp on POSIX RE's, you can understand Perl RE's much easier.
