Reputation: 1186
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.
Can you guys please help me in this.
thanks a lot.
Upvotes: 1
Views: 215
Reputation: 14605
(\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.
Upvotes: 1
Reputation: 224864
If you just want the text in quotes, a non-greedy match should work:
".*?"
Upvotes: 2