I've been struggling with getting a working regular expression for a little project of mine. Can anyone help me with a regex that matches anything inside <>
symbols, but only when they are not preceded by a \ symbol?
For example:
<Escaped characters \<\> are right in the middle of this sentence.>, <Here is another sentence.>
Must match
1: Square brackets \<\> are right in the middle of this sentence.
2: here is another sentence.
So far I've managed
/<([^\\][^>]*?)>/ig
but that gives
1: Escaped characters \<\
2: Here is another sentence.
What am I doing wrong? :(