Thursday, November 15, 2012

regular expression to match xml attribute values

Lead Id="xxxx" and AgentId="yyyyy" are two attributes in an XML file (Lead Id must be the first)
[\s\S]*Lead Id="([^"]*)"[\S\s]*AgentId="([^"]*)"