In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Jeff Oien") wrote:

> if (preg_match("/[a-Z],[a-Z]/",$text)) {
> 
> Can you tell me where I'm failing here. I want to do something
> if the string has commas in between words with no spaces. 
> Like:
> 
> blah,blah,blah

"Does it have *any instance where a string of letters is separated only by 
a comma?" preg_match("/[a-z]+,[a-z]+/i",$text)

"Does it consist *entirely of strings of letters separated only by comma?" 
preg_match("/^[a-z]+,[a-z]+$/i",$text)

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to