|User: Aaron -- 2013-06-22 << 1088 1090 >>|
|Type: Text file parser|
|Search all Text file parser examples|
|I would like to extract and save text between brackets to a one file. Also, save the text outside the brackets to another file as per the output examples.|
|Billy's mother checked her watch. (It's time for us to go.) |
(I don't want to go to the doctor.) Billy cried and ran into his room.
His mother knocked on his door. (Billy, you come out here right now.)
Billy hid under his bed. (No, I'm never coming out.)
Extract all text between ( and ) brackets in following format:
(It's time for us to go.)
(I don't want to go to the doctor.)
(Billy, you come out here right now.)
(No, I'm never coming out.)
Extract all text outside brackets:
Billy's mother checked her watch.
Billy cried and ran into his room.
His mother knocked on his door.
Billy hid under his bed.
|Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.|
|1. open "Tools->Batch Runner" window |
2. drag all(or one) text files to "Batch Runner" window
3. change the "set filename" entry to:
4. click "Fast Replace" button to open "Fast replace" dialogue
5. click "add" to add replace rule
* leave "search" to be blank
* set "replace" to:
* click "ok"
6. make sure regular expression option is checked, click "start", all text with bracket will be write to new files with name of file.bracket.ext
To write the content without bracket to new files, you just need:
* change step 3 to:
* change step 5 to:
Screenshot 1: Batch_Runner_Window