This site uses cookies.
Some of these cookies are essential to the operation of the site,
while others help to improve your experience by providing insights into how the site is being used.
For more information, please see the ProZ.com privacy policy.
Omer Shani Israel Local time: 21:58 Member (2012) English to Hebrew + ...
Dec 10, 2021
We have several project that contains the following variable: %s or similar ones.
We can't run a usual regex for it turns to be greedy and we are puzzled how to solve it to recognize the variable only, not more not less.
Any ideas?
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Samuel Murray Netherlands Local time: 20:58 Member (2006) English to Afrikaans + ...
@Omer
Dec 10, 2021
Omer Shani wrote:
We can't run a usual regex for it turns to be greedy and we are puzzled how to solve it to recognize the variable only, not more not less.
Add Regex tagger as a cascading filter to your import filter
Dec 10, 2021
You have an easy way of doing this. When you import, import with options, then add a Regex Tagger filter thus creating a cascading filter. In the Import dialog box, click the Regex tagger filter and enter this in the dialog box:
The two letters in brackets allow you to also consider %d if you want that. If you have placeholders other than %s or %d, you can add more letters here. I hope this helps!
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Omer Shani Israel Local time: 21:58 Member (2012) English to Hebrew + ...
TOPIC STARTER
Thank you!
Dec 10, 2021
Thank you Tomas & Samuel.
Your comments were very helpful
Omer
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
You are most welcome. Personally, I find memoQ's approach to Regex a bit confusing because it is handled differently depending on the feature. For instance, the Regex for "%s" in the Autotranslatables feature requires a different syntax.
Mentioning Autotranslatables, this is another area that is extremely useful in the context of localization. I encourage you to have a look! It might save you a lot of time in certain situations!
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
%s is not really a regex. By "not really", I mean in regex, a string always matches itself (except when the string contains regex syntactical elements). As such, %s is "greedy" only when the associated operation (possibly implicitly) is "greedy" (such as find and replace all).
How do you want to handle %s?
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
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.
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!
The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.