Re: [PHP] preg match compilation error

2003-10-27 Thread Curt Zirzow
* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]): > Do you realy want to use [ and ] as patern delimiters? My quess is that > you want to use it for defining character class. Then the only character > that must be escaped is - > > '/[^a-z0-9,._+()\-]/i' actually, you don't even need that escape

Re: [PHP] preg match compilation error

2003-10-27 Thread Marek Kilimajer
Do you realy want to use [ and ] as patern delimiters? My quess is that you want to use it for defining character class. Then the only character that must be escaped is - '/[^a-z0-9,._+()\-]/i' Luis Lebron wrote: I found a reqular expresion that I'm using to check for valid characters in file n

Re: [PHP] preg match compilation error

2003-10-27 Thread Curt Zirzow
* Thus wrote Luis Lebron ([EMAIL PROTECTED]): > 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 > } preg_* need a pattern deliminater (most

[PHP] preg match compilation error

2003-10-27 Thread Luis Lebron
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 paren