Given a template that looks like this:
<td class="creditapp heading">{*}Street Address:</td>
<td colspan=2 class="tdaddressblock">
<!-- @template="addressBlock" for="buyer" prev="" @-->
^^ might be a space here, might not ^^ always a space here
</td>
I need to read the name=value pairs out of the comment, plus the whole string so it can be replaced. Names could be any alpha-numeric with no spaces, values could contain anything except double quotes, will be short as possible, and will always be surrounded by double-quotes.
So, possible formats:
<!-- @pizza="yes" @-->
<!-- @ingredients="cheese sauce meat" @-->
<!-- @ drinks="yes, please" breadsticks="garlic, butter (lots); cheese" @-->
I've tried a dozen different variations, but the most successful I've been so far is to get the first name="value" pair and nothing else, or I get the whole page worth of stuff. So the desired matches are
[1] <!-- @ drinks="yes, please" breadsticks="garlic, butter (lots); cheese" @-->
[2] drinks
[3] yes, please
[4] breadsticks
[5] garlic, butter (lots); cheese
The closest I've come so far is
<!-- @(( |)([\w]+)="(.*?)")+ @-->
but it only returns the last pair, not all of them.