Sorry The previous code was wrong, Its the correct version, $x = "a b;c d;e f;"; preg_match('/(?P<keys>\w) (?P<values>\w)/',$x,$m); print_r($m); Now I am using backrefrence \1 in in ?P option like (?P<\1>\d+). and I got the error. -- Blog: http://talk.cmyweb.net/ Follow me: http://twitter.com/shiplu Stop Top Posting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php