Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Not equal, regular expressions

by RMGir (Prior)
on Jun 25, 2002 at 15:43 UTC ( #177117=note: print w/ replies, xml ) Need Help??

in reply to Not equal, regular expressions


Assume the parameter is "mike.txt". Then the regex will match for .txt, but fail for .htm and .html, so the error will get printed twice.

If the parameter doesn't match any of those patterns, the error gets printed 3 times.

You're also not checking to make sure the extension is at the end of the filename, so that would match "miketxt.exe" as well, since /.txt/ is "any character, followed by 'txt'".

Please check out this discouraging webpage to get some other ideas of ways your script could possibly be abused...

Comment on Re: Not equal, regular expressions

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://177117]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2016-02-07 11:24 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (251 votes), past polls