Page 1 of 1

Searching and Writing HTML doc

Posted: Wed May 18, 2005 4:17 pm
by nickison99
Hi All,
I have a plain html document that is included into a PHP4 page, and I would like to be able to do the following to it:
1) Search the HTML page located on the same server for a given string ("<a name="top"></a>" lets say) and remove all instances of it.
2) Search the HTML page for a given string (A date similar to "Wednesday, May 18, 2005")
3) Be able to write some html tags in the html page ("<a name="top"></a>" lets say) directly after the date in the source
4) Save it, display it etc..

Any ideas about how I could go about it would be great. I dont necessarily need exact code, but some guidance would be good as well. Thanks.

Posted: Wed May 18, 2005 6:28 pm
by Ambush Commander
Regular Expressions for 1-3.
4 is very generic. There's many ways you can do this.