Question: I'll be the first to admit that my Regex knowledge is hopeless. I am using java with the following

```
Matcher m = Pattern.compile(">[^<>]*</a>").matcher(html);
while (m.find()) {
 resp.getWriter().println(html.substring(m.start(), m.end()));
}

```

I get the following list:

```
>Link Text a</a>
>Link Text b</a>

```

What am I missing to remove the `>` and the `</a>`.

Cheers.

Answer: 
Have you looked at using a [capturing group](http://www.exampledepot.com/egs/java.util.regex/Group.html) ?

```
Pattern.compile(">([^<>]*)</a>")

```

Note however that it's generally *not recommended* to use regular expressions for HTML, since HTML isn't regular. You will get more reliable results by using an HTML parser such as [JTidy](http://jtidy.sourceforge.net/).
A nice quick way to test your regular expressions, is to use a regex editor such as the following eclipse plugin:
<http://brosinski.com/regex/>