Regex for WPML xliff files
Thread poster: Omer Shani
Omer Shani
Omer Shani  Identity Verified
Israel
Local time: 08:25
Member (2012)
English to Hebrew
+ ...
Apr 27, 2022

When it comes to WPML xliff file, we can handle most of the tags this file type shows.
Only, that we received from the client a new xliff with many segments which appear with many %%%%, as you can see here:

%%title%% %%sep%% The updated 2022 collection is already here! %%sep%% %%sitename%% will be happy to be at your service if you have any question of request - enter the %%title%% collection

The rule here is of course that any text between 2 %% should be filtered
... See more
When it comes to WPML xliff file, we can handle most of the tags this file type shows.
Only, that we received from the client a new xliff with many segments which appear with many %%%%, as you can see here:

%%title%% %%sep%% The updated 2022 collection is already here! %%sep%% %%sitename%% will be happy to be at your service if you have any question of request - enter the %%title%% collection

The rule here is of course that any text between 2 %% should be filtered out, through it might be confisued when there are 2 consecutive %% (i.e: %%sep%% %%sitename%%), but how to do so, without letting the filter being too greedy or under greedy, in case there are also other segments with valid percentage mark?
Collapse


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 08:25
English to Russian
Example Apr 27, 2022

Omer Shani wrote:
other segments with valid percentage mark
You can try this:
%{2}[^%]+%{2}2022-04-27_185129If it doesn't do what you want, give a couple of examples please.

[Edited at 2022-04-27 19:00 GMT]


 


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


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

Regex for WPML xliff files






Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »