Search and replace - right way
Submitted by Sunday, 17 August, 2008 - 21:48
on
I have recorded macro like this:
SearchAndReplace.setSearchString("\\{[\\s\\t]+"); SearchAndReplace.setReplaceString("\\{ "); SearchAndReplace.setBeanShellReplace(false); SearchAndReplace.setIgnoreCase(true); SearchAndReplace.setRegexp(true); SearchAndReplace.setSearchFileSet(new CurrentBufferSet()); SearchAndReplace.replaceAll(view);
It works fine, but slow and it beeps each time and so on.
How it should be coded using java.util.regex?
--
regards,
takeshin
SearchAndReplace.setSearchString("\\{[\\s\\t]+"); SearchAndReplace.setReplaceString("\\{ "); SearchAndReplace.setBeanShellReplace(false); SearchAndReplace.setIgnoreCase(true); SearchAndReplace.setRegexp(true); SearchAndReplace.setSearchFileSet(new CurrentBufferSet()); SearchAndReplace.replaceAll(view);
It works fine, but slow and it beeps each time and so on.
How it should be coded using java.util.regex?
--
regards,
takeshin