Let me explain.
I have a css page that is stored in a table, it presents itself in this form:
. styleFloatCenter, form.styleFloatCenter,. focus {
margin: auto;
width: 70%;
}
All css is built like that, it is a norm.
I need to recover for all my css “rules” the 2nd element like styleFloatCenter for my example.
An idea? Ty !
Edit :
2nd example :
. red, form.redColor,. focus {
margin: auto;
width: 70%;
}
Here i need redColor…
Try javascript regex –
Can check it here.
You can assign each rule one by one using loops.
If you want to parse the whole css doc together then first use a pattern to search a rule and then second element