I have this string
@test <span class="mention">@test</span> @test2 <span class="mention">@test</span>`
And I would like to match all words starting with an @ symbol outside the span in Javascript
I have created the RegExp for matching the span objects
/<span class="mention"((.*)data-mention="\d+")?>@\w+<\/span>/g
But I just can't work out how to get elements not inside the span element!
/<span[^>].*?<\/span>/g