Suppose you had a Java file which contained lots of single letter variable names like a,x,f etc, and you wanted to change them to something more meaningful. You could try replacing every occurrence of ‘f’ with ‘filename’, but that would mess up all of the places where ‘f’ occurs inside a word (for example in the keyword if ). How would you go about correcting this problem using regular expression search and replace?
I need to write this in Emacs, using word boundaries. Since I am new, does using the Matcher Class apply?