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.
I would like to know the correct procedure for filtering on a negative case, meaning something that is NOT there.
For example, imagine I have a particular word that should have a full stop after it, but there are many instances where this full stop is missing.
In a local project, I would filter for the word with the full stop and lock all the segments.
Then I would filter on all unlocked segments looking for just the word.
This would show me all the segments that do not have the full stop after it.
The above works perfectly, but what can be done in online projects where it is not possible to lock segments? I could change the status to "edited", "not started" or "pretranslated" but this would mess up the entire project.
Does anyone have any suggestions concerning how to perform such a "negative search" in an online project? ▲ Collapse
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
William Tierney United States Local time: 12:21 Member (2002) Arabic to English
REGEX to the rescue
Dec 6, 2022
Hi Neil,
This sounds like a job for regular expressions (REGEX). I have used it for various filters in both the target and source columns. MemoQ has a series of tutorials, and there are other tutorials out there. It takes a bit for a "word person" to get their head rapped around the symbolic logic aspects of REGEX, but it is a powerful tool.
Daniel Fernandes
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Neil Allen France Local time: 18:21 Member French to English
TOPIC STARTER
There probably is a solution with REGEX
Dec 6, 2022
Hi William,
I think you are right, but the difficulty lies in searching for what is NOT there, rather than what IS there.
It appears it can be done with a negative lookahead.
Thanks for your reply!
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Stepan Konev Russian Federation Local time: 19:21 English to Russian
Regular expressions
Dec 6, 2022
Try this regular expression that will filter all segments that do not contain 'word.' (your case): ^(?>(?!word\.).)*$ For this regex you also need to type the source term for memoQ to narrow down the scope of filtering: Source filter: (?i)mot Target filter: ^(?>(?!word\.).)*$
(?i) means non case sensitive, i.e. it includes mot and Mot.
If you suppose that your target segments may contain the 'word(.)' but not the source equiva... See more
Try this regular expression that will filter all segments that do not contain 'word.' (your case): ^(?>(?!word\.).)*$ For this regex you also need to type the source term for memoQ to narrow down the scope of filtering: Source filter: (?i)mot Target filter: ^(?>(?!word\.).)*$
(?i) means non case sensitive, i.e. it includes mot and Mot.
If you suppose that your target segments may contain the 'word(.)' but not the source equivalent 'mot(.)', then you can use this for the target filter: (?i)word[^\.]|(?i)word$
=== Another regex that may be useful too filters segments that include word1 but do not include word2 (not your case but just in case): ^(?!.*(\bword2\b)).*(\bword1\b).*
Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.
Exclusive discount for ProZ.com users!
Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value