Keep It Simple, Stupid | |
PerlMonks |
Re: basic question: regular expressionby AnomalousMonk (Archbishop) |
on Dec 01, 2016 at 13:50 UTC ( [id://1177038]=note: print w/replies, xml ) | Need Help?? |
It's sometimes useful to know where in a string a match occurs. Note in particular the /a*/ regex which I added at the end. This matches the empty string at offset 0 even though a perfectly good 'aaa' sequence is available further on. Engrave "Leftmost Longest" on a prayer wheel and keep it ever spinning in your mind. Regexes are the most counterintuitive thing I've encountered in the realm of programming. Updates:
Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|