Quantcast
Channel: ProZ.com Translation Forums
Viewing all articles
Browse latest Browse all 3915

How to convert TMX to tab-delimited? | A text editor that supports regular expressions

$
0
0
Forum: CAT Tools Technical Help
Topic: How to convert TMX to tab-delimited?
Poster: Stepan Konev
Post title: A text editor that supports regular expressions

If I had to do this task, I would use a text editor that supports regex (similar to Notepad++, for MacOS).
If that MacOS text editor can mark the match, you can use the following regex:
(?<=<seg>)(\n|.)*?(?=</seg>)
to mark and then copy all segments to clipboard:
[img] [url removed] [/img]
Then you paste the copied segments into an MS Word file and convert it all into a 2-column table.

If there is no text editor available for MacOS that can mark and copy the marked text to clipboard, then you have to use an inverted regex for replacement:
^(.(?!(<seg>(\n|.)+?</seg>)))*$
to replace the match with a blank field.
[url= [url removed] ][img] [url removed] [/img][/url]
Then you can copy it all into MS Word and remove blank strings by replacing two paragraph marks with one. And again select all and convert into a 2-column table.

[Edited at 2022-10-14 01:06 GMT]

Viewing all articles
Browse latest Browse all 3915

Trending Articles