what kind of regex statement would i use to say something like
if (EVERY CHARACTER IN THE STRING IS UPPERCASED)
{
....
}
thx!
You might be able to use [man]ctype_upper/man.
If not, then something like:
if (preg_match('/^[A-Z]$/', $text)) { //all uppercase }
sweet! thx a lot!
just a note, the pattern may be missing a quantifier
/^[A-Z]$/: 1 character which is uppercase /^[A-Z]*$/: 0 or more -"- /^[A-Z]+$/: 1 or more -"-
yep, I missed out the +, i.e.
if (preg_match('/^[A-Z]+$/', $text)) { //all uppercase }