Implementing a highlight feature for a live search in JavaScript/JQuery
<p>I'm trying to implement a highlighting feature for a livesearch.</p>

<p>What I do is, send an ajax request with an token the user looks for. I receive an html text containing a table.</p>

<p>So I thought I could use a simple regex, looking for the users token and then surround it with a span, but I am receiving some longfilled <code>&lt;a&gt;</code> - Tags, so chances are good that the user types something and I break my HTML by replacing something inside a tag.</p>

<p>So how can I exclude html tags in my search?</p>

<p>Oh I'm using javascript regexp.</p>
