Hi,
I'm developing a php tool to convert thousands of pages at our company to a new structure. I want to match a piece of html code like this using regexp:
<a href="http://www.mydomain.com/">
The problem I'm encountering is that some of the HTML code has line breaks in it and I can't be 100% certain where they will occur.
e.g.
<a
href="http://www.mydomain.com/">
e.g.
<a href=
"http://www.mydomain.com/">
I need a regular expression that can match the above code fragments and still be successfull if there is a line break anywhere within the code (i.e. I want it to ignore line breaks and focus on the code itself).
Any ideas?
For your reference, this is my current regexp:
"/<a(.)href=['|\"]{0,1}http:\/\/www.mydomain.com\/([>])>/isU"