I started off naming my jQuery objects like $this.
Then, I decided I didn’t want to do it anymore.
I just borrowed a large chunk of code from an old project. It is from the $ prefix days, and it is irking me!
What regex can I use in my IDE to get rid of the $ prefixes on my variables?
To do it right, you will have to parse the javascript and replace only identifiers and not literals. Of course, it may not be worth the effort if your codebase is pretty small.
There are a few javascript parsers out there – ANTLR, google closure compiler and JS lint may have an implementation.