How to retrieve the quoted value of a property.
suppose you have some expression like:
[html:text property="pqrs" styleClass="text" style="width:200px"].
And now i want to retrieve the value of property, styleclass and style ie "pqrs", "text" and "width:200px" respectively.
开发者_JS百科Can you guys please help me in this.
thanks a lot.
If you just want the text in quotes, a non-greedy match should work:
".*?"
(\w+)\=\"(.*?)\"
The first capture group (\w+)
gives you the attribute name, and the second capture group uses a non-aggressive operator to match things inside quotes.
精彩评论