http://www.perlmonks.org?node_id=338852

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I am writing a script to parse css files. I need a regex that will seperate lines similar to this:
font-family: Verdana, Arial, Geneva, san-serif; font-size: .69em; color: #666666
Into something like this:
font-family
Verdana, Arial, Geneva, san-serif
font-size
.69em
color
#666666
The numbers of names and values is dynamic. Some css selectors have 1 name value pair, some have half a dozen. I can write a regex that grabs one name value pair but I am stumbling over writing one that will match each pair in the string. Thanks in advance for any help!