Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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 having an uproarious good time at the Monastery: (8)
As of 2015-11-25 20:25 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (690 votes), past polls