The Eclipse editor is powerful, and regular support is sometimes useful. In addition to programming, there are times when you can do something else.
For example: There are tools generated SQL script, but not meet the requirements, need a small change. Do not want to write a program, Perl I will not write, batch processing is not strong enough, how to do, directly with the eclipse of the regular replacement function can do:
For example: SQL is a series of insert statements, separated by newline, in the form of INSERT into t_table (FID,.....) VALUES (' FID value ',....);
To be replaced by: delete from t_table where fid= ' FID value '.
The first step: replace the INSERT into t_table with the delete from t_table where fid=. There is no need for this.
Step Two: Change values (replace with where fid=, which requires a regular:
Will FID([/u0000-/uffff]+?) Values are replaced with empty strings.
Step three: Will (/X2C) ([/u0000-/uffff]+?) (/n) to be replaced by/n
By looping through, you can replace the original string with the expected string.
In fact, the standard regular usage mentioned above is not limited to eclipse, but it is a small difference to use for different editors or compilers.