Hello Tom,

Friday, April 23, 2004, 3:42:57 PM, you wrote:

TR> $string = "hello world!!!!!!!!!!!!!!!!! how arrrrrrrrrrrrrrre you today?????!!";
TR> if(preg_match_all('/(\w)\1{4,}|(\W)\2{4,}/',$string,$match)){
TR>   echo "too many repeated characters<br>";
TR>   print_r($match);
TR> }
TR> That will catch everything, except numbers, that is repeated 4 or more
TR> times.

Absolutely perfect - thank you!

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to