Eliminating all lowercase words
| From: | Andre Dubuc | Date: | Mon, 14 Jun 2004 21:49:30 +0000 |
| Subject: | Eliminating all lowercase words | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-188282@lists.php.net to get a copy of this message | ||
Hi folks!
I need a function that will examine input for lowercase words. In the
processing of that input, I would like to eliminate them (so as to keep all
uppercase words).
I prototyped a reasonable function using the 'Find: using regex feature' in
KWrite, so it works there.
$search "(([^\bA-Z][a-z]\b*?)*?));
$replace = "";
$add = preg_replace($search, $replace, $add);
hWhen I tried it, it eliminated all lowercase words, and in the case of the
single upper case word, 'Bellingham', it retained only the capital 'B' --
arrgh!
Is there access to the internals of ucase function so I can find out how to do
this, or is there any easier way?
Any ideas, suggestions, and even admonitions would be very welcome!
Tia,
Andre