Hi. I've been trying to work with this all afternoon and had no luck. I'm trying to write code replace a certain HTML tag in a text document.
The line in the text file that I'm trying to work with is:
will begin his presentation at <st1:time Minute="30" Hour="9">9:30 a.m. in 100 Butler Hall, home of the computer science and engineering department.
I'm trying to remove <st1:time Minute="30" Hour="9">
using this code:
$htmlsearch2 = "/<st1:time Minute=\"30\" Hour=\"9\">/";
$story = preg_replace($htmlsearch2, '', $story);
When I run that, it skips over the tag entirely.
BUT
When I use this code (which only leaves out the final "> characters)
$htmlsearch2 = "/<st1:time Minute=\"30\" Hour=\"9/";
$story = preg_replace($htmlsearch2, '', $story);
It works and I get this result:
will begin his presentation at ">9:30 a.m. in 100 Butler Hall, home of the computer science and engineering department.
Not sure why I can't get it to include that "> before the time.
Any thoughts??? This is really frustrating!
Thanks!!