Search and replace
<p>I'm working on a new project and i want to do something similar (somehow) to intellitext ads (without popup though). In fact, i want to add links on certain words. The problem is that i don't know how to handle this. </p>

<p>I mean, ok, i get document.innerHTML then what? I can find any word, but some may be inside of tags. I don't want to replace words from textarea or text inside of a link. Same for input, select, and so on.</p>

<p>Also, the way i've managed things, i replace even the html tags (if the word is <code>select</code> for example, the script will replace <code>&lt;select&gt;</code> tag. And i really don't want this :P</p>

<p>So, any idea? Where to start ? What to do? Anything?</p>

<p>I wish a solution that works without any library, or, if is mandatory, to work with jquery (this is what i know). </p>

<p>I think that some regexp may help. The problem is... I never understand them :s</p>

<p>Any help will be appreciated. Thanks a lot!</p>
