On Wed, 2 Jun 2010 12:14:47 -0400
Alice Wei aj...@alumni.iu.edu 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
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/i,
On 2 June 2010 18:14, Alice Wei aj...@alumni.iu.edu 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
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 aj...@alumni.iu.edu wrote:
Hi,
I have a code snippet here as in the following:
[CODE
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 ?
?php
$user=root;
$pass=;
$db=aa;
$dblink =
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
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
* 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 commonly
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
* 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. It
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
11 matches
Mail list logo