Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Re: Expression searching via Form Input

by damian1301 (Curate)
on Apr 13, 2001 at 03:56 UTC ( #72249=note: print w/ replies, xml ) Need Help??

in reply to Re: Expression searching via Form Input
in thread Expression searching via Form Input

Actually, since it is an email address, there will most likely be an @ sign. But, since this person does not backslash it, it is considered an array and the regex engine will bitch. This happened to me today because I was trying to retrieve the $NORM value. Since "$NORM" has a dollar sign in it, the regex engine thought it was searching for what was in the variable $NORM and complained that there was no such variable.

So, whenever you have a regex, always search for @, $, and % signs to make sure they are blackslashed. Also, if you are trying to match HTML, make sure you backslash then end tags (eg. <\/HTml>) so that the match won't stop.

But really, if you were using CGI, strict, and -w, then this error should have been caught and never questioned.

Almost a Perl hacker.
Dave AKA damian

I encourage you to email me

Comment on Re: Re: Expression searching via Form Input
Replies are listed 'Best First'.
(tye)Re: Expression searching via Form Input
by tye (Sage) on Apr 13, 2001 at 23:44 UTC

    BTW, the % character is never interpolated in a regular expression.

            - tye (but my friends call me "Tye")

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2015-10-13 09:52 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (299 votes), past polls