Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2018-02-17 19:34 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (249 votes). Check out past polls.