@NogDogNov 10.2009 — #First thing that comes to mind (untested): [code=php] $count = strlen(preg_replace('/W/', '', $string); [/code] "W" is "any non-word character," so it would count a-ZA-Z0-9 and underscores. If you wanted it more restrictive, you would need a more specific regexp, such as '/[^a-ZA-Z]/' to replace anything that is not a letter.