Hi Im trying to write a simple CSS parsing script in PHP that enables me to put previously declared classes within a css rule, i.e. the Mixins functionality of less and Sassy.
This regex only grabs the last css class name within the curly braces:
{.+(\.\w+).+}
For example, only .foo will be matched in the below css rule:
.login_form_container { .gradient .rounded_corners width:431px; height:282px; margin:250px auto 0; .foo }
Thanks!