Syntactic Confectionery Delight | |
PerlMonks |
Re^5: Perl RE; how to capture, and replace based on a block?by Laurent_R (Canon) |
on Dec 18, 2013 at 18:36 UTC ( [id://1067674]=note: print w/replies, xml ) | Need Help?? |
Hi Chris just a quick example on greedy and non greedy quantifiers, under the Perl debugger: As you can see the default "*" quantifier is greedy, so that the regex tries to match as much as possible. Using the modified "*?" quantifier, the regex becomes non greedy. You will see the same type of result if you try the "+" and the "+?" quantifiers.
In Section
Seekers of Perl Wisdom
|
|