Have the following string:
text TOKEN text TOKEN text <elem attr="text TOKEN text">text TOKEN text TOKEN</elem> text TOKEN text
Need a RegEx that will give me all TOKEN but NOT in any part of any elem element
EDIT: I do have the RegEx to gather all elem elements.
<elem(.*?)>(.*?)</elem>
I cannot figure out how to exclude these from the RegEx to find TOKEN