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

Re: Re: Expression searching via Form Input

by damian1301 (Curate)
on Apr 13, 2001 at 03:56 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found