String Question. How to count the number of A,a, numeric and special char
- by Brad
I have randomly created strings such as
H*P2[-%-3:5RW0j*;k52vedsSQ5{)ROkb]P/*DZTr*-UX4sp
What I want to do is get a count of all Caps, lower case, numeric and special characters in each string as they are generated.
I am looking for an output similar to
Caps = 5
Lower = 3
numneric = 6
Special = 4
Fictitious values of course.
I have gone through the php string pages using count_char, substr_count etc but cant find what I am looking for.
Thank you