in reply to Re: Difficult? regex
in thread Difficult? regex
Does this mean that the regex for filtering image files will also match anything that ends in a period? I thought the final question mark would make a "non greedy" match. I should note that I'm not much of a Perl programmer and definitely not very good at regex expressions. I've read several sites on regex and tried all sort of variations on this regex but just can't get it to work. I've put several hours of work into this already so I'm not just looking for someone to write the code for me. Until now that is :-) So anyway, I also tried the regex without the question mark and it doesn't work either:# ignore any common image files return if $uri->path =~ /\.(gif|jpg|jpeg|png)?$/;
return if $uri->path =~ /\?(C=N;O=D|C=M;O=A)$/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Difficult? regex
by hipowls (Curate) on Feb 23, 2008 at 00:52 UTC |