Thanks for the respose.
The '?' is needed to signify a named group; it's necessary, and that part of the expression works fine.
I've since come up with this expression, which works better, but still isn't perfect:
@"<%(?<NAMES>\w*)(\((""(?<ARGS>[^""]*))+\))?%>"
With this, I get the separate parameters, but also the comma delimiters. So if the input was <%Foo("bar", "bar")%>, the captures in the ARGS group would be (without the single quotes):
'bar'
', '
'bar'
'' <- empty string
Again, I realize why this is happening, but no matter what change to the expression I try, I only succeed in breaking it completely.
|