Understanding Greediness: Improve Your Understanding of Reg-exes
When we first learn how to write regular expressions, we're happy if we can find a pattern (any pattern!) which seems to match the input data. Efficiency isn't high on our minds, after all "everyone knows that regular expressions are slow!".
This talk will attempt to provide a greater understanding of how regular expressions work. Particular emphasis will be placed on greediness and its impacts on efficiency. A handy regular expressions tool, called the Regex Coach (which is free-as-in-beer) will be used to help show-case the examples.
Some mention of corollary Perl myths may be made, but in general the paper will be largely open for developers of any language.
Keywords: Regular Expression
|
Jacinta Richardson
Training Coordinator, Perl Training Australia
|
Jacinta is a prominent figure on perlmonks, actively supports many local Australian Open Source user groups such as Melbourne, Sydney, Canberra and Brisbane Perl Mongers, Melbourne and Sydney LinuxChix and various Linux and BSD user groups. In her free time she likes to work in her garden, scuba dive and cook.
Ref: OS6P0012