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
  • Paul and Nora,

    you are completely right, but Glossary Converter, as logical, works on entire files and I have some "strange" clients who do not have any SDL application installed (and that, most of times, do not absolutely know what a CAT tool or a MultiTerm are) but they want to have a sort of control on step-by-step processes (and not limited to translation) I am carrying out, even when the require a "clean" final file. But, as I have said, they are "strange" (euphemism :-) clients.

    This is the reason why i often need to operate on source *.txt files and, so, create routines that my clients could clearly understand.

    Thank you in any casoi for you help and comments.

    Claudio
Children