exclude characters from counting?

Posted on 16th Feb 2014 by admin

Hello, I wanted to ask if you have a string like:
Code: $my_s='ASRGREGTGTR----REGREGRE+++RRRRRR....';

is there a way to count the length of the string, excluding non-word characters (+,- or .)?

thank you

Other forums