On 7/14/06, Steve Turnbull <[EMAIL PROTECTED]> wrote:
I have a string similar to the following;
cn=emailadmin,ou=services,dc=domain,dc=net
I want to extract whatever falls between the 'cn=' and the following
comma - in this case 'emailadmin'.
$pattern= "/[^=]+=([^,]+)/";
preg_match($pattern, $string, $matches);
print_r($matches);
Voila! (Untested for now, I'm pretty drunk so sorry if it ain't workin
out like you want to)
--
Kim Christensen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php