I have a text with ‘a’ tags there. I have to add some new tags and attributes.
It looks like this:
'Some test <a href="site">here</a>. Yet <a href="site2">another</a> test.'
Now I have to get:
'Some test <noindex><a rel="nofollow" href="site">here</a></noindex>.'
'Yet <noindex><a rel="nofollow" href="site2">another</a></noindex> test.'
Any fast ways to do that with php? Thanks.
Something like this would cover most real world cases: