Re: ereg help

From: Date: Mon, 03 Dec 2001 16:48:26 +0000
Subject: Re: ereg help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-76392@lists.php.net to get a copy of this message
This is a good starter about PHP and regular expressions. http://www.phpbuilder.com/columns/dario19990616.php3
----- Original Message ----- From: "Valentin V. Petruchek" <petruchek@zsu.zp.ua> To: <php-genral@lists.php.net> Sent: Monday, December 03, 2001 6:35 PM Subject: [PHP] ereg help
I'm not new for php, but have no experience working with ereg functions.
My
problem is the following: i have string.. for example
     $s="id {name,title,nick} [http://www.php.net]";
i want to break it in several parts: $p[0]="id"; $p[1][0] ="name"; $p[1][1] ="title"; $p[1][2] ="nick"; $p[2]="http://www.php.net"; The part in [] is not neccessary, count of {} elements is not less than 1 I can do it with string fucntions, but it seemes to me it's better to use regular functions. Could anybody help me to solve this problem and advise resource for
studying
regular expresions? Zliy Pes, http://zliypes.com.ua
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
-- Jim Musil --------- Multimedia Programmer Nettmedia ------------- 212-629-0004 jim@nettmedia.com

« previous php.general (#76392) next »