Hi! Could you please point out where I went wrong?
The text editor didn't find any matches for the pattern ^(t[\d+]\s+=\s+")(.*)("\s+--), so I changed it to ^(t.[\d]+.\s+=\s+")(.*)("\s+--) which seemed to work (I by no means know what I'm doing when it comes to regex, so the issue probably lies here). I replaced the matches with $1\t$2\t$3 and converted the file to TSV.
However, when I opened it as a TSV in Excel, all the lines were in one long row (see the screenshot).
How do I fix this? Is there another regex pattern I could try?
Updated the original post. The old regular expression didn’t work since the editor ate a \
at the start and \[t]
means something different than [t]
.
You can do this replacement in two steps without regular expressions:
- Replace all
= "
with=<tab>"
. - Replace all
" --"
with"<tab>--"
.
Then remove the lines at the start just like I mentioned above and it should work. (Does so for me in Excel.)