Hello i am trying to find and replace all at Dreamweaver using regular expression.
My CSS:
.class1{
position:relative;
float:left;
margin: 2px 1px 0px 0px;
}
.class2{
position:relative
float:left;
margin: 0px 1px 0px 0px;
}
Now i want to find all margin using regular expression and want to replace them by adding !important at the last.
Already i can find using regular expression by using this
margin:.*?;
Now i want to replace all margin with !important using regular expression at Dreamweaver. example
margin: 0px 1px 0px 0px !important;
can anybody give solution.
Tested in DW CS6
Search: margin:((?:\s*\d+px)+)\s*;
Replace: margin:$1 !important;
I made the regex a bit specific so we don't add !important when we already have !important :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With