I have 12k lines of SCSS code and I need to replace all CSS transitions like this:
transition: background .3s ease;
or
-webkit-transition: background .3s ease;
with a SASS mixin
@include _transition(background .3s ease);
After lots of research I've end up with a sed command like this
sed -i '' 's/transition: ([a-zA-Z0-9.]*);/@include _transition\((\1)\);/' *
But of course it doesn't work. I'm using a Mac and the error I get is:
sed: 1: "s/transition: ([a-zA-Z0 ...": \1 not defined in the RE
Please help!