February 24th, 2013, 04:02 AM
I have url like this i want it to accept .pdf and .PDF
$url =~ m|\/([\d\]*-[\d\]*\.pdf)$|;
February 24th, 2013, 09:27 AM
Add the 'i' modifier to the end of the regex to enable case insensitivity.
See perldoc perlre
It's covered under the "Modifiers" section near the top.
February 24th, 2013, 12:33 PM
Yes, the "i" modifier will take care of letter case ( pdf or PDF or even Pdf, pDf, etc.)
But I am not sure that this part or your regex:
really does what you want it to do.