Regex for template tag with attributes
Posted
by
Funkmyer
on Stack Overflow
See other posts from Stack Overflow
or by Funkmyer
Published on 2011-01-08T05:26:39Z
Indexed on
2011/01/08
12:53 UTC
Read the original article
Hit count: 172
Hi,
I haven't found my answer after reading through all of these posts, so I'm hoping one of you heavy hitter regex folks can help me out. I'm trying to isolate the tag name and any attributes from the following string format:
{TAG:TYPE attr1="foo" attr2="bar" attr3="zing" attr4="zang" attr5="zoom" ...}
NOTE: in the above example, TAG will always be the same and TYPE will be one of several preset strings (e.g. share,print,display etc...). TAG and TYPE are uppercased only for the example but will not be case sensitive for real.
© Stack Overflow or respective owner