I have a Low Replace tag that uses a regex to target links:
{exp:low_replace
find='<a[^>]*href=QUOTE(.+)QUOTE[^>]*(.*)>(.*)<\/a>'
replace='<a href=QUOTE$1QUOTE$2 style=QUOTEcolor: #007766; text-decoration: underline;QUOTE><span style=QUOTEcolor: #007766;QUOTE>$3</span></a>'
regex='yes'
}
<a href="http://google.com" target="_blank">Search on Google</a> <a href="http://bing.com" title="Search on Bing">or Bing</a>.
{/exp:low_replace}
But if the links are on the same line, Low Replace will only replace the last one. If I separate the links with a line break, like this:
<a href="http://google.com" target="_blank">Search on Google</a>
<a href="http://bing.com" title="Search on Bing">or Bing</a>.
then Low Replace works as expected.
I'm certain this is some problem with my regex, can anyone offer some insight?