Regex to get the class data from the .css file

Apr 1, 2013 at 9:49 AM
Edited Apr 1, 2013 at 9:49 AM
Hi ,

How to extract all the .class data from an stylesheet for the classes listed in an string list.

Eg:
1) i have a list of string

htmlClassNames[0]="abc"
htmlClassNames[1]="def"
          .
          .
          .
htmlClassNames[n]="xyz"

2)a css file say style.css
i want to extract all the class data from the style.css
ie .abc{style}
        .def{style}
and also if there say div .abc{style}

how can i achieve this?