regular expression to extract from the middle of a string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey folks

I don't want to "just get you to do the work", but I have so far tried
in vain to achieve something...

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'.

Question(s);
is this possible via a regular expression?
does php have a better way of doing this?

Some pointers would be greatly appreciated. Once I have working, I will
be creating a function which will cater for this and will post to this
list if anyone is interested?

Cheers
Steve

-- 
Steve Turnbull

Digital Content Developer
YHGfL Foundation

e steve.turnbull@xxxxxxxxx
t 01724 275030

The YHGfL Foundation Disclaimer can be found at:
http://www.yhgfl.net/foundation-services/yhgfl-email-disclaimer/

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux