View Single Post
Old 09-30-2022, 09:19 AM   #116
pzack
Connoisseur
pzack began at the beginning.
 
Posts: 79
Karma: 10
Join Date: Aug 2022
Device: kobo sage,elipsa
Hello, M Sarmat89,

Thank you for your message.

I am referring to your posts 113 and 115.

113; No, "s:^ +::" needs to be run before merging lines by those 4 lines, and adding tabs.

Please include all commands that you've used, in full in the posts in the future.

I am not sure what this means; is this the full code to use before the 4 lines? Is this for unfolding lines?

Does "s:^ +::" replace (?<=\S)\n(?=\S) for unfolding lines and to be used just before the 4 lines?

I assume, then, that perl -pe "s:^ +::" < destination.tsv | perl -pe 's/\n\n+/\|\|/sg' | perl -pe 's/\n/ /sg' | perl -pe 's/\|\|/\n/sg' | perl -pe 's/^(\S+)/$1 /sg' | perl -pe "s:^([^[]+?) *(?=\[):\1\t:" > new.tsv

replaces perl -pe "s:^([^[]+?) *(?=\[):\1\t:" <your-file-here >destination.tsv

Am I using the original full txt file to start with? I am a little confused about what file that I should be using to begin with and I begin with the unfolding of lines, correct?

Thus, is my post 114 correct except for your replacements above. I want to be certain about the code that I am to use for unfolding lines.

I am to dis-regard this code from your earlier posting; ^([^[]+?) *(?=\[)

replaced with
Code:

\1\t

Is that correct that this code has been superceded?


Cordially,
pz

Last edited by pzack; 09-30-2022 at 09:27 AM.
pzack is offline