get data between inverted commas and more

proof23

New Member
i have aproblem for a few days right now :s ...I'm trying to get some changing data inside a string, the string is something like this:\[code\]<docdata> <!-- News Identifier --> <doc-id id-string ="YBY15349" /> <!-- Date of issue --> <date.issue norm ="2012-09-22 19:52" /> <!-- Date of release --> <date.release norm ="2012-09-22 19:52" /> </docdata>\[/code\]What i need is only the date inside the "2012-09-22 19:52" , the string its stored in some type of xml, malformed by the way. So i can't use normal xml parser, i load/read the file already to change some charset\[code\] $fname = $file; $fhandle = fopen($fname,"r"); $content = fread($fhandle,filesize($fname)); str_replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>", $content); etc..\[/code\]this work like a charm, but with the string i cant use it.I try with preg_match_all but i can`t get it right.Its there a simple way to search this value \[code\]<date.issue norm ="2012-09-22 19:52" />\[/code\]and get just the date in a variable?thanks in advance and sorry for my english.
 
Back
Top