Try using preg_match_all with this pattern:

        "/([A-Z].*[^A-Z])/U"

While this pattern does not get you exactly what you want, I think it
serves as a starting point. I am not too good with regular expressions
so I'll let the more accomplished regex people on the list jump in at
this point.

Shaunak Kashyap
 
Senior Web Developer
WPT Enterprises, Inc.
5700 Wilshire Blvd., Suite 350
Los Angeles, CA 90036
 
Direct: 323.330.9870
Main: 323.330.9900
 
www.worldpokertour.com
 
Confidentiality Notice:  This e-mail transmission (and/or the
attachments accompanying) it may contain confidential information
belonging to the sender which is protected.  The information is intended
only for the use of the intended recipient.  If you are not the intended
recipient, you are hereby notified that any disclosure, copying,
distribution or taking of any action in reliance on the contents of this
information is prohibited. If you have received this transmission in
error, please notify the sender by reply e-mail and destroy all copies
of this transmission.


> -----Original Message-----
> From: Jay Blanchard [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 17, 2006 10:24 AM
> To: Dave Goodchild
> Cc: php-general@lists.php.net
> Subject: RE: [PHP] Converting a string
> 
> [snip]
> 
> If you have similar element names in $_POST, comething like:
> 
> $human_friendly = array("psFirstName" => "First Name");
> 
> foreach ($_POST as $ key => value) {
> 
> echo "Cannot leave {$human_friendly[$key]} blank";
> 
> }
> 
> [/snip]
> 
> But I don't want to create another array, and should'nt have to

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to