What happened if you tried?
You could extract and count the number of "special" characters. Or you could (extract and) count the number of "normal" characters, and subtract that from the length of the string. See perlop on how to match, and perlre on how to create your regular expression.
You could also eliminate all "normal" characters and count what is left over. See perlop on the tr/// operator.
In reply to Re: count special character
by Corion
in thread count special character
by bharatbsharma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |