Re: greedy preg

From: Date: Wed, 06 Aug 2003 22:39:01 +0000
Subject: Re: greedy preg
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-158578@lists.php.net to get a copy of this message
> > Yeah, it should be. What kind on content can be around $file and also > within the <item> tag? > here's a snip of the xml file... it's finding the $file correctly, but deletes all records from the beginning of the file onwards. it leaves the xml file with valid xml ... <news> at the start... so for the most part the preg is working... it's just being too greedy at the start for whatever reason... <news> <item> <title>fhh</title> <date>1060205191</date> <text>hhh</text> <file>xml/news/1060205191.xml</file> </item> <item> <title>fgjghjh</title> <date>1060205186</date> <text>fgjh</text> <file>xml/news/1060205186.xml</file> </item> <item> <title>fgjhh</title> <date>1060205182</date> <text>fghh</text> <file>xml/news/1060205182.xml</file> </item> </news>

« previous php.general (#158578) next »