Hi, I have a string which contains mixed language characters (Chinese and English).
I would like to ask how to count the number of characters for English letters ('a-z', 'A-Z') and numbers ('0-9') and these characters '(', ')' in the string?
Thanks
$len_in = strlen(preg_replace("/[[:alnum:]\s\(\)]/", "",$string)); or $len_in = strlen(preg_replace("/[[:alnum:]\(\)]/", "",$string)); if you don't wish to count spaces.