hi:
I need to write a PHP function that will change all HTML links in a string ending in .html to end in .php. i.e., if the
the string had a link in it like this: <a href="link.html"> then the function would change that link to read: <a href="link.php">
my pattern matching skills are a little weak and i want to make sure the function can match tags like this <a
href = "blah blah"> but also <a href=foo.html> etc.
that is to say, quotes are optional, there may be other attributes in the tag (such as target, class or onclick tags) before or after the actual link. it also needs to handle arbitrary whitespace.
any help would be much appreciated!