I have a huge CSS file and I want to convert all ID selectors to Class selectors from a certain name using regEx in Find and Replace
area in the text editor. I am using Sublime Text 3
.
In this file, I have some hex colors as expected like #333 and #ff0000
which need to be considered and the regEx
pattern should not track it.
Expected Result
find:
#333 /*do not track*/
#ff0000 /*do not track*/
#item1 /*found*/
#item2 /*found*/
#item3 /*found*/
replace:
#333 /*do not track*/
#ff0000 /*do not track*/
.item1 /*done!*/
.item2 /*done!*/
.item3 /*done!*/
P.S the name either can or not having numbers on it. Need to accept letters and numbers in a way that do not match this hex color pattern above
What is the best regex pattern to reach this? Thanks in advance!