User: editor -- 2018-11-09 << 1424 1426 >> |
Hits: 3170 |
Type: Text file parser |
Search all Text file parser examples |
Description: |
How to batch extract A1~A5 from txt file to a single file? Files has following 2 format, note: In following data example: \r stands for CR(return) |
Input Sample: |
.............................. SHIPPER: \r\r (B1)\r(A1)\r\r(B2)\r(A2)\r\rB(3)\r(A3)\r\r(B4)\r(A4)\r\r(B5)\r(A5)\r\r\r .............................. .............................. SHIPPER: (A1)\r\r (B2)\r(A2)\r\rB(3)\r(A3)\r\r(B4)\r(A4)\r\r(B5)\r(A5)\r\r\r .............................. .............................. |
Output Sample: |
SHIPPER: (A1),(A2),(A3),(A4),(A5) SHIPPER: (A1),(A2),(A3),(A4),(A5) |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. open "Tools->Batch Runner" menu 2. drag multiple txt files to "batch runner" window * click "Fast Replace" button open "Fast Replace" window * click "Add" to add new rules: * set "search" to: * set "replace" to: * click "ok" * make sure "reg exp", "cross line" and "extract" options are checked. * click "start", and click "save output to single file", done! Note: for csv file, to avoid separator confusion, you can add a pair of quote for each item, like: |
Screenshot 1: Batch_Runner_Window |