Regex is quite confusing to me, so let me provide an example here and hopefully someone can help me out.
I am building an array of icons, the css looks like this.
.icon-download:before {
content: "\f01a";
}
.icon-upload:before {
content: "\f01b";
}
.icon-inbox:before {
content: "\f01c";
}
.icon-play-circle:before {
content: "\f01d";
}
There is way more icons obviously, but I need to get the icon name, instead of going through each one and erasing it, I want to use regex to erase .icon- keep the icon name then erase from :before to the end }
I read about regex but there are so many different answers and problems, what is the general way of replacing special characters and numeric values 1-10 and alphabet a-z.
So replacing .icon- with blank will be easy as well as :before { content:"\ then it gets tricky with the random numbers.
So my question is whats the best syntax for what I am trying to achieve?