String in test
style="whatever:0; morestuff:1; otherstuff:3"
Regex
style\s*=\s*"([^"]*)"
Group Content 1
whatever:0; morestuff:1; otherstuff:3
Note!
It is very difficult to write a regular expression parser that is correct, safe, and supported. If you need to write a program that deals with HTML in a reliable, reliable and safe way, you should use a real HTML parsing library such as jsoup (Java) or the Html Agility Pack (C #). To find the HTML parser for your favorite language, Google: yourlanguage html parser .
Mike clark
source share