Counting Capital Letters
| From: | Richard Davey | Date: | Wed, 20 Jun 2007 23:32:33 +0000 |
| Subject: | Counting Capital Letters | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-257529@lists.php.net to get a copy of this message | ||
Hi,
I've written a short regexp which will *count* how many capital letters
are in a given string (the woefully simple: '/[A-Z]/')
Although it's an English language web site, I'm curious how you'd
count capital letters that span beyond just the standard A-Z.
For example characters such as the Latin capital letter S with Acute.
I'm not interested in covering all possible character sets, but I
don't want to piss-off any Europeans who may register on the site and
want to use one of "their own" capital letters.
Anyone approached this before?
Cheers,
Rich
--
Zend Certified Engineer
http://www.corephp.co.uk
"Never trust a computer you can't throw out of a window"