Re: [PHP] Preg Match Problem

2010-06-03 Thread Simcha Younger
On Wed, 2 Jun 2010 12:14:47 -0400 Alice Wei wrote: > > Hi, > > I have a code snippet here as in the following: > > [CODE] > $keywords = preg_split("/[\s,]+/", $day); > $count = count($keywords); > if(preg_match("(Mon|Tue|Wed|Thu|Fri)/i", $keywords[$i])) { //line 40 >$day_query ="start_t

RE: [PHP] Preg Match Problem

2010-06-02 Thread Alice Wei
> From: peter.e.l...@gmail.com > Date: Wed, 2 Jun 2010 18:17:00 +0200 > Subject: Re: [PHP] Preg Match Problem > To: aj...@alumni.iu.edu > CC: php-general@lists.php.net > > On 2 June 2010 18:14, Alice Wei wrote: > > > > Hi, > > > > I have a code sn

Re: [PHP] Preg Match Problem

2010-06-02 Thread Peter Lind
On 2 June 2010 18:14, Alice Wei wrote: > > Hi, > > I have a code snippet here as in the following: > > [CODE] > $keywords = preg_split("/[\s,]+/", $day); > $count = count($keywords); >  if(preg_match("(Mon|Tue|Wed|Thu|Fri)/i", $keywords[$i])) { //line 40 You're lacking the starting delimiter '/'

[PHP] Preg Match Problem

2010-06-02 Thread Alice Wei
Hi, I have a code snippet here as in the following: [CODE] $keywords = preg_split("/[\s,]+/", $day); $count = count($keywords); if(preg_match("(Mon|Tue|Wed|Thu|Fri)/i", $keywords[$i])) { //line 40 $day_query ="start_time.day='12345' AND end_time.day='12345'"; } if(preg_match("Sat

Re: [PHP] preg match

2005-01-07 Thread Rory Browne
I'm not sure what you're trying to do with preg_match, since the parameters you send to it, are from the database, and an undeclared variable $msg(which is what exactly). Unless you give us examples of the arguments to preg_match, and what you expect the results should be, as well as what they are

[PHP] preg match

2005-01-07 Thread Chandana Bandara
This php script perform matching text of some certain URLs. but in this preg_match it wont match few patterns < _ . with help of this script , can some body help me to match the other all patterns .plz ? "; if ( preg_match("/$chk_msg/", "$msg", $match) ) {

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

[PHP] Preg Match

2001-12-20 Thread phantom
I am passing a string and making sure all the characters in that string are valid. Example: For a persons age I am using: if (!preg_match("/^[0-9]+$/", $Age)) echo "Please Enter numeric value for age". But how would I include the following characters as permissible in preg match ~!@#$%^&*()

[PHP] preg match question

2001-12-14 Thread phantom
I am passing a string and making sure all the characters in that string are valid. Example: For a persons age I am using: if (!preg_match("/^[0-9]+$/", $Age)) echo "Enter numeric value for age". But how would I include the following characters as permissible in preg match ~!@#$%^&*()-=_+,.?