I'm trying to match some variable names in a html document to populate a dictionary. I have the html
<div class="no_float">
<b>{node_A_test00:02d}</b>{{css}}
<br />
Block mask: {block_mask_lower_node_A} to {block_mask_upper_node_A}
<br />
</div>
<div class="sw_sel_container">
Switch selections:
<table class="sw_sel">
<tr>
<td class="{sw_sel_node_A_03}">1</td>
<td class="{sw_sel_node_A_03}">2</td>
<td class="{sw_sel_node_A_03}">3</td>
<td class="{sw_sel_node_A_04}">4</td>
<td class="{sw_sel_node_A_05}">5</td>
I want to match code between { and ( } or : ). But if it starts with {{ I don't want to match it at all (I will be using this for inline css}
so far I have the regex expression
(?<=\{)((?!{).*?)(?=\}|:)
but this is still matching text inside {{css}}.