I need to make a script that can do the following:
1) Search for all occurences of
"http://www.domain.com/forum[##]/html/[postid].html"
2) Search for the corresponding threadid, based on the postid (embedded above)
3) Replace the string in #1 with
"http://www.domain.com/Temp/showthread.php?threadid=[threadid]"
The URL that I am searching for would be located in a table called "post" column "pagetext" and will be surrounded by other information (as this is a forum). The threadid and postid are stored in table "thread" threadid is in a column titled "threadid" and postid in column "postid". I need the remainder of the content in "post" to remain the same, only the URL to be replaced.
Any suggestions, hints, tips or recources will be very much appreciated.