ereg help

From: Date: Mon, 03 Dec 2001 16:38:38 +0000
Subject: ereg help
Groups: php.general 
Request: Send a blank email to php-general+get-76391@lists.php.net to get a copy of this message
----- 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 > >

« previous php.general (#76391) next »