Regular expression for correcting proper nouns

From: Date: Wed, 17 Jul 2002 12:07:27 +0000
Subject: Regular expression for correcting proper nouns
Groups: php.general 
Request: Send a blank email to php-general+get-108058@lists.php.net to get a copy of this message
Hi All, I'm looking for a simple was to correct a list of proper nouns given all in lower case! For example given $string="london paris rome"; I would like "London Paris Rome". However there is one cavet; if the word already has a captital anywhere in it, it should be left alone!!! Is there a soultion using regular expressions? Also is there one for removing multiple spaces? i..e given "A B C D E" it would give "A B C D E". I have never used regular expression before and thought that if I had some examples like these, I could go from there. Henry

« previous php.general (#108058) next »