Atom RegExp Search+Replace: Exact Match Symbol+AlphaNumeric with OR Ending Semicolon for Classes
Why is this important?
I am basically converting all of the colors on the web application to color variables. Now that I have a list of all of the colors, I am replacing close color matches to a main color variable name to consolidate a color code palete.
I am trying to find out how you would write a regular expression for an exact string match. The regular expression search & replace is for the ide Atom where I can search for specific classes without doing variable overrides; like $color_base1 and $color_base11. The default word match will not work in this scenario sadly because of the prior example.
Also, the end of the variable can end in a semicolon or no; so an or statement ending match. Goal is to have an exact regExp match for variables names that are "$color_base1" & "$color_base1;"
What I have so far? I know its bad.. I am learning. :(
I would greatly appreciate any guidance and advice on how to achieve this,
I was a little bit unclear on whether you wanted to match "$color_base11" or not. If you do, change the regex to this: