Re: matching ' in regx

2008-08-27 Thread Mr. Shawn H. Corey
On Tue, 2008-08-26 at 22:31 -0600, Dan Baker wrote: > There must be some really odd stuff going on with html encoding or regx! > Anyway, if I change my match to :: I can now catch the situation... not > that I understand how a ' gets changed to :: In Perl version 4, a single quote was use to de-re

Re: matching ' in regx

2008-08-27 Thread Jenda Krynicky
From: Dan Baker <[EMAIL PROTECTED]> > I have a thing driving me NUTS trying to detect a ' in a variable > with regex, and either strip it out or at least detect and error out. > for instance, this just does NOT work. DO NOT TEST FOR DANGEROUS CHARACTERS! MAKE SURE YOU ONLY HAVE THE SAFE ONE

Re: matching ' in regx

2008-08-26 Thread Dan Baker
Mr. Shawn H. Corey wrote: $UploadedImage = 'badname\'s.jpg' ; if ( $UploadedImage =~ m/'/ ) { ... How do I match the ' ? You match it exactly like you're doing. Since CGI is involved, I'd look elsewhere from the problem. Are you absolutely certain that some software between the browser a

Re: matching ' in regx

2008-08-26 Thread Mr. Shawn H. Corey
On Tue, 2008-08-26 at 17:59 -0600, Dan Baker wrote: > I have a thing driving me NUTS trying to detect a ' in a variable > with regex, and either strip it out or at least detect and error out. > for instance, this just does NOT work. > > $UploadedImage = 'badname\'s.jpg' ; > > if ( $Uploaded

RE: matching ' in regx

2008-08-26 Thread Wagner, David --- Senior Programmer Analyst --- WGO
From: Dan Baker [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 26, 2008 17:00 To: beginners@perl.org Subject: matching ' in regx I have a thing driving me NUTS trying to detect a ' in a variable with regex, and either strip it out or at least detect and error out. for instance, this just d