Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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 making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-09-18 22:22 GMT
Find Nodes?
    Voting Booth?

    How do you remember the number of days in each month?

    Results (125 votes), past polls