A query to "Regex Gurus"

Good morning to all,

I hope this is the right place where posting this query, even if it is not strictly tied to SDL TS processing, but an operation sometimes needed to create a bilingual Excel file to import in SDL Studio 2015.

Suppose to have a plain text file like this one (Notepad++ 6.8.6) with the English (source) string on one line and the Italian (target) string in the subsequent line (this latter, sometimes, is a blank segment):

and that I'd need a result like this (a [TAB] instead a [CR][LF]) at the end of English [source] string followed by the Italian [target] string) to import and process it in SDL Studio 2015 using the "Bilingual Excel" file filter:

which I obtained creating a repetitive macro in Notepad++.

Now my query is quite simple, as I was not able to imagine it:

  • Can anyone suggest a "Find and replace" Regex function (provided it is possible) to transform the [CR][LF] at the end of the English (source) string to a [TAB], leaving untouched the [CR][LF] at the end of the Italian (target) segment in the whole document?

This will allow me to generate a *.csv (*.txt) file to import in a MS Excel sheet with, say, source text in column "A" and target text in column "B" to process it in SDL Studio using the "Bilingual Excel" file filter as follows:

Thank you for any advice/suggestion you might propose.

Claudio

Parents Reply
  • This looks very interesting but I'm wondering if it isn't unnecessarily complicated when the idea is TMX-->SDLTB. I had to do just that yesterday, and the Glossary Converter handled the task in a matter of seconds with only a couple of clicks. Then later I needed to import a long list of terms provided in Excel by the client to the recently created SDLTB and I considered using the Multiterm Converter and then importing it in Multiterm, but decided to do a merge instead in the Glossary Converter, and once again the Glossary Converter didn't disappoint, it worked like a charm!
Children
No Data