How do you check if text is in between certain <tags>?

Bob Sanders wrote:

For instance, I have a similar block of text like so:

@text = "Lorem ipsum <code>[some code here]</code> dolor sit"
What sytax would I use to check if the text is in between the <code>

That is: "If @text is in between '<code>' and '</code>' tags, then

Any ideas?

This regex pattern seems to work


extracting the string now is a bit more difficult
-- jarod

If this can / is being done in rjs or javascript, then Prototype has
methods that can do this. Jarod Reid wrote: