Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1425.Text file parser -- How to batch extract A1~A5 from txt file to a single file?

User: editor -- 2018-11-09          << 1424  1426 >>
Hits: 2841
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


Screenshot 2:  Fast_Replace_Window


Similar Examples:
How to batch extract html title from files and link to the file? (73%)
How to batch generate html files from a html template file? (63%)
How to batch extract specified words from one txt file with specified name? (63%)
How to batch rename last part of filenames to the strings from a file? (63%)
How to batch rename PDF files with the date inside the file? (62%)
How to batch rename text files with random line from file contents? (62%)
How to batch combine multiple files into single files? (61%)
How to extract text after last comma in a string in htmlx file? (61%)

Check Demo of Text file parser
Keywords:
quote  quot  return  output to single file  rules  cross line  batch extract  batch extrac  csv  save output  replace data from csv batch  format csv txt  extract data  replace quote  batch file for each replace single  add line return  extract csv  add a return