Welcome to WebmasterWorld Guest from 184.108.40.206
Moderators: coopster & jatar k
is there a way to count the length of the string, excluding non-word characters (+,- or .)?
Off the top of my head I can think of like 3 other ways to do this, but the one above seems simplest.
$my_s='ASRGREGTGTR----REGREGRE+++RRRRRR....'; $chars = preg_replace("/\W/i","", $my_s);
echo $chars ."<br>"; echo strlen($chars);
Become a Pro Member