|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re: Regex helpby GrandFather (Cardinal) |
| on Sep 10, 2012 at 04:00 UTC ( #992660=note: print w/ replies, xml ) | Need Help?? |
|
+ is greedy and will match as many of whatever it applies to as it can. Generally it is smart to avoid . and use an explicit set of characters to match. In this case everything except / looks like it may be what you want:
Note that I used ! as the regex delimiter to avoid having to quote all the / characters.
True laziness is hard work
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||