...

View Full Version : Remove all Non-Tagged XML Question



theflyingminstr
02-27-2010, 06:11 PM
Hi I have a doc that outputs in this format:

Fri Feb 26 13:16:39 PST 2010:- <?xml version="1.0" encoding="UTF-8"?>

What might be the best way to strip everything to the left of <?xml version="1.0" encoding="UTF-8"?> in order to output everything as a clean XML doc?

Thanks so much

koko5
02-27-2010, 06:53 PM
Hi, try
echo preg_replace('#^(.*?)(\<\?xml\b)#misux','$2',$Input_String); :thumbsup:

theflyingminstr
02-27-2010, 07:15 PM
Thanks so much!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum