This is a discussion on RE: [PHP] Re: preg match compilation error (Resolved) within the PHP General forums, part of the PHP Programming Forums category; Thanks, That did the trick. Luis -----Original Message----- From: DvDmanDT [mailto:dvdmandt@telia.com] Sent: Monday, October 27, 2003 3:...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Thanks,
That did the trick. Luis -----Original Message----- From: DvDmanDT [mailto:dvdmandt@telia.com] Sent: Monday, October 27, 2003 3:19 PM To: php-general@lists.php.net Subject: [php] Re: preg match compilation error Start and end with same char, for example with a / or a #... Like if(preg_match("#[^a-zA-Z0-9,._\+\()\-]#",$filename)) -- // DvDmanDT MSN: dvdmandt€hotmail.com Mail: dvdmandt€telia.com ########################## Please, if you are using windows, you may be infected by Swen. Please go here to find out more: http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen http://securityresponse.symantec.com/avcenter/venc/data/w32.swen.a@mm.html ########################## "Luis Lebron" <llebron@sigmatech.com> skrev i meddelandet news:CE5C3E60DCF0D5118C7F00A0C9EBCE23041550@SIGMA2 ... > I found a reqular expresion that I'm using to check for valid characters in > file names. > > Here's the sample code: > > if(preg_match("[^a-zA-Z0-9,._\+\()\-]",$filename)) > { > //blah, blah, blah > } > > However, when I run the script I get the following error: > Warning: Compilation failed: unmatched parentheses at offset 17 in > /home/httpd/sigmarapid/html/test/upload.php on line 137 (the line with the > preg_match) > > I'm new to regular expressions so any help would be greatly appreciated. > > Luis R. Lebron > Sigmatech, Inc > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
![]() |
| Thread Tools | |
| Display Modes | |
|
|