What I want to accomplish:
I want to match certain explicit content outside of comments.
An Example:
<div>
<div>Hello $world$</div>
<div>Another text <!-- $example$--></div>
</div>
<div>
How are $you$?
</div>
<!--
<div>
Lorem ipsum $dolor$ sit
</div>
-->
Words I want to match: $world$
, $you$
Words I don't want to match: $example$
, $dolor$
So far I was only able to match either all or none.
What I can't do:
I can't delete all comments because because it's required to provide the source code I filtered.