Basically I have this string for example $str = 'По, своей 12' I need something that returns the numbers of chars and numbers (leaving off spaces and other punctuation)
How can I achive this? Maybe doing a preg_replace with \p{L} and [0-9] ?
countChars('По, своей 12'); //> Should return: 9
Note: mb_strlen() counts spaces and punctuation too and i don’t want this
I did it: