but not to catch the following:<A class="classname" href="http://domain/subfolders">some text <BR /> more text</A>
<A href="http://domain/subfolders" class=classname>some text <BR /> more text</A>
<A href="http://domain/subfolders" class="classname">some text more text</A>
<A class="classname" href="http://domain/subfolders">some text more text</A>more text</A>
to catch the first 3 strings i tried this:
Unfortunately it catches the second one too. I cannot figure it how to replace .+ so <br /> (or any other tag) to pass except </a> tag.'@<a[^>]*classname[^>]*>.+</a>@i'