Regex, variables in XML and Excel files
Αποστολέας σε συζήτηση: Hakan Kiyici
Hakan Kiyici
Hakan Kiyici  Identity Verified
Τουρκία
Local time: 05:33
Μέλος από 2009
Αγγλικά σε Τουρκικά
+ ...
May 16, 2018

Hi,

I was wondering if anyone can help or give direction for this. I use Trados 2015.

I have a client who is likely to have more of this kind of content with variables and placeholders. I have checked the available options of Regex and using variables. But I couldn't make them work.

The file comes in XML and Any XML picks it up. But I would need the solution for Excel file as well (I could not make the Excel
... See more
Hi,

I was wondering if anyone can help or give direction for this. I use Trados 2015.

I have a client who is likely to have more of this kind of content with variables and placeholders. I have checked the available options of Regex and using variables. But I couldn't make them work.

The file comes in XML and Any XML picks it up. But I would need the solution for Excel file as well (I could not make the Excel option work either. Saw https://multifarious.filkin.com/2013/08/21/embedded_content_excel/ )

I tried to modify Embedded Content Processing etc. Maybe I am looking at this from wrong perspective.

Below is an excerpt.

Any help would be greatly appreciated. It would be great time saver as I am copying the source to the target and moving the variable around by copy-paste.

Thank you


If you understand this and would still like to proceed with %1% choice, click the "{:sidSGAllowExecutionButton:}" button below.[n:15]If the object(s) were previously removed by {:sidMainCaption:}

Please click the "%2%" button to have {:sidMainCaption:} close all %1% windows.[n]To skip scanning %1% cookies, click the "{:sidSkip:}" button.
Collapse


 
Jaime Oriard
Jaime Oriard  Identity Verified
Μεξικό
Local time: 20:33
Μέλος από 2005
Αγγλικά σε Ισπανικά
+ ...
You're in the right track May 16, 2018

You just have to write the regex you need. Try with this simple one:

To catch %...% try %[^\s]+%
To catch {...} try \{[^\s]+\}
To catch [...] try \[[^\s]+\]

Or you could just put them together, like so:
%[^\s]+%|\{[^\s]+\}|\[[^\s]+\]

Be careful though. These are so basic that they may catch strings that need to be translated.

I normally use this site to test my
... See more
You just have to write the regex you need. Try with this simple one:

To catch %...% try %[^\s]+%
To catch {...} try \{[^\s]+\}
To catch [...] try \[[^\s]+\]

Or you could just put them together, like so:
%[^\s]+%|\{[^\s]+\}|\[[^\s]+\]

Be careful though. These are so basic that they may catch strings that need to be translated.

I normally use this site to test my regex: https://regexr.com/

Good luck!
Collapse


 
Hakan Kiyici
Hakan Kiyici  Identity Verified
Τουρκία
Local time: 05:33
Μέλος από 2009
Αγγλικά σε Τουρκικά
+ ...
ΞΕΚΙΝΗΣΕ ΤΟ ΘΕΜΑ
will look into this May 16, 2018

Hi Jaime,

Thank you for the invaluable information. I will try these.

I believe these should go to Embedded Content Processing section. I tried both XML and Excel version. I will try these if they catch those variables.

Kind regards

Hakan Kiyici

Jaime Oriard wrote:

You just have to write the regex you need. Try with this simple one:

To catch %...% try %[^\s]+%
To catch {...} try \{[^\s]+\}
To catch
try \[[^\s]+\]

Or you could just put them together, like so:
%[^\s]+%|\{[^\s]+\}|\[[^\s]+\]

Be careful though. These are so basic that they may catch strings that need to be translated.

I normally use this site to test my regex: https://regexr.com/

Good luck! [/quote]


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Regex, variables in XML and Excel files







Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »