View Single Post
Old 09-16-2022, 02:53 PM   #63
Sarmat89
Fanatic
Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.
 
Posts: 515
Karma: 2268308
Join Date: Nov 2015
Device: none
Your file contains OCR errors.

Code:
^([^[]+?) *(?=\[)
replaced with
Code:
\1\t
will insert the tab after the text preceding the first [ in the line, excluding the spaces, and the [ itself.

If you are going to use perl, try
Code:
perl -pe "s:^([^[]+?) *(?=\[):\1\t:" <your-file-here >destination.tsv
Sarmat89 is offline