I\'m looking for a regular expression that matches the \'>\' in
a > b
>
b>
...
but not two or more angled brackets, i.e. it should
The issue here is that when you use the lookahead, you're matching the second > (there's no > after the second >), and when you're using the lookbehind, you're matching the first >.
You could probably use this:
[^>]>[^>]
There's a >, with no > before or after it.
But I think that to suit what you exactly need, need to use lookaheads and lookbehinds both:
(?)>(?!>)