get part with regex

Go To


I need to get everything bewteen


and the following <

in this case:


I would like to get the word example. Here is a more complicated example of where it should work as well:

onmouseout="'#fff'">going to drink?<br></span><span title="Juist!" onmouseover="'#ebeff9'" onmouseout="'#fff'">Exactly!</span></span></div></div>

So here i need 2 of them back (and not joined).

Could someone help? I suck at regex.

Someone edited my tag to javascript. I need a solution to use in java, i just get a file as plain text. So javascript or html solutions are not really helpfull.

2012-04-03 21:15
by clankill3r - James Montagne 2012-04-03 21:19


Regex with html? Well, If you have to parse only a few lines then ok. But in general is better to use a html parser (because HTML is not a regular language).

This is pure gold:

2012-04-03 21:19
by Enrique Marcos