I am attempting to do some find and replace on a java source file.
Currently my classes have invalid names (imported from a tool that did poor auto naming) of the form:
public class [0-9]{2}[A-Za-z]+
I would like to insert underscores around the digits, resulting in a valid class name of the form
public class [_][0-9]{2}[_][A-Za-z]+
However using Eclipses find and replace tool, with the regex box check on both the find and replace strings does not format the output as I'd like.
It takes
02ListOfValidAppIDs
and makes it
[-][0-9]{2}[_][A-Za-z]+
instead of
_02_ListOfValidAppIDs
How can you make the regex keep the arbitrary number and text and just plug them in for the replace string?
(Edit: As a note, with the preview feature I can see that eclipse is correctly finding all of the names I wish to replace, and nothing else)