Petras has asked for the wisdom of the Perl Monks concerning the following question:
should work, but it matches/\.(.*)?$/;
So, I tried moving the quantifier inside the parents:RF2A7FF2E.TMP PROFILE.DOC BETTER..JPG -.JPG
to the same results. No one ever promised regexes would be easy... What did I miss?/\.(.*?)$/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Those greedy quantifiers!
by jwkrahn (Abbot) on Apr 01, 2010 at 01:36 UTC | |
|
Re: Those greedy quantifiers!
by ikegami (Patriarch) on Apr 01, 2010 at 01:46 UTC | |
|
Re: Those greedy quantifiers!
by Anonymous Monk on Apr 01, 2010 at 01:13 UTC |