I have an input text file that needs a lot of conversion to an output text file.
I would like to specify a sequence of replacement commands inside a script file, where each command would do its particular replacement throughout the text file. This script will contain possibly hundreds of replacement commands. The commands themselves can be simple replacement commands (e.g. replace all { with [) or more complex regular expressions.
This script would need to be run against various input files.
On 26.07.2012 16:47, l m wrote:
> I have an input text file that needs a lot of conversion to an output
> text file.
>
> I would like to specify a sequence of replacement commands inside a
> script file, where each command would do its particular replacement
> throughout the text file. This script will contain possibly hundreds
> of replacement commands. The commands themselves can be simple
> replacement commands (e.g. replace all { with [) or more complex
> regular expressions.
> This script would need to be run against various input files.
>
> What is the best way to automate this process?
Take a look at org.eclipse.text.edits.TextEdit.