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: 
Keep in mind that due to its limited nature, your regex (and regex in general) may run into problems if the HTML you're trying to parse is slightly more complex. For example, the following would fail to parse correctly, but is completely valid (and common) HTML:

```
<a href="blah.html">this is only a <em>single</em> link</a>

```

You might be better off using a DOM parser (I'm pretty sure Java has plenty of options in this regard) that you can then request the inner-text of each `<a>` tag.
I'm late to the party but I'd like to point out another alternative:

```
(?<=X)      X, via zero-width positive lookbehind

```

If you put your initial `>` into that mess, i.e.

```
(?<=>)[^<>]*</a>

```

then it should not be returned as part of your result.

Untested, though. Good luck!