Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

Right.

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...
--
Mike

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2016-07-23 18:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (221 votes). Check out past polls.