Hi all,

Asked this question a while ago but didn't get much response to my thread. I'm unfamiliar with much of regular expressions so I may not require them, but I can't think of another way to achieve the result without them.

As stated in the past thread, I've been messing with the Joomla! core files and have written a little SEO code using a simple replace expression.

Problem is I have certain parts of articles where I don't want any replacement. Namely, inside <pre></pre>, I would like the text to remain unchanged. To summarise I want to take this:

PHP Code:
Lorem ipsum dolor sit ametconsectetur adipiscing elit
Nulla lacinia interdum tinciduntAliquam erat volutpat
Maecenas sodales auctor justoeu suscipit tortor lacinia sit amet
Aliquam lacinia molestie enim at lacinia
And convert it to:

PHP Code:
Lorem ipsum dolor sit ametconsectetur adipiscing elit
<
a href="http://www.google.com">Nulla</alacinia interdum tincidunt
<
a href="http://www.yahoo.com">Aliquam</aerat volutpat
Maecenas sodales auctor justoeu suscipit tortor lacinia sit amet
Aliquam lacinia molestie enim at lacinia
Etc., etc.

However, if the above paragraph should occur inside <pre></pre>, it should ignore it. Got no problem at all converting keywords to links, that's easy, but have no clue how to write the necessary regular expression to ignore all text within the named tags.

Also I realise there's plenty of Joomla! extensions to add links, but I'm not interested in installing those for unimportant reasons.

Cheers.