I have to replace 'page1' in some code with '<a href="/page1">page1</a>'
However, I only want to do so if it is not already a link. How can I do the same using php regular expressions.
- Use case 1 - page1 -> should change to
<a href="/page1">page1</a> - Use case 2 -
<a href="/page1">page1</a>-> nothing should be changed