On Fri, 30 Mar 2001 14:34, Mike Gifford wrote:
> Hello,
>
> For some reason I am now having real difficulties removing and parsing
> some XML files. I think that if I can just strip out the <? & ?> that
> I should be able to parse the XML (.CDF) file. This should do it:
> $pagetext = eregi_replace('<?','',$pagetext);
> $pagetext = eregi_replace('?>','',$pagetext);
>
> I've attached the whole CDF file at the bottom of this message.
> However, I think that the following should strip out the offending part
> as well: $pagetext = eregi_replace('.*/TITLE>','',$pagetext);
>
> Unfortunately, for some reason it just isn't working for me. I have
> other scripts working just fine using similar code (on the same page).
> However, this just isn't working for me today.
>
> Any suggestions on what I'm overlooking would be great.
>
> Mike
I'm no regex guru but isn't the ? a special character? Try using
str_replace instead; it should be quicker also.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]