Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Maybe, maybe not. I think it's overkill, but your proposal is too simple. It might cause false matches if there were a 'www.swf.com' (or even 'www.swfa.com') I'd probably use something like: m/[.]swf(?:$|[?])/iif we're not capturing, there's no reason to need '.*' to get the rest of the line, so a simple alternate (end of line, or a question mark), will work just fine. It's almost as few characters to use the following, and there would hopefully be less confusion about what it's doing for novices: m/\.swf$|\.swf\?/iIn reply to Re^2: questions of a perl beginner on regex
by jhourcle
|
|