Welcome to WebmasterWorld Guest from 188.8.131.52
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