I want to write a regular expression that will replace the word Paris by a link, for only the word is not ready a part of a link.
Example:
i\'m l
Traditional answer for such question: use a real HTML parser. Because REs aren't really good at operating in a context. And HTML is complex, a 'a' tag can have attributes or not, in any order, can have HTML in the link or not, etc.