Normally, when you're working on a translation, you use Quick find to search for and replace text in the documents. But when you need to fine-tune your search, you need to turn to the Advanced find and replace window.
How to get here
- Open a document for editing: Open a project. In Project home, choose Translations. Double-click the name of the document.
- Press Ctrl+F. The Quick find window opens. Press Ctrl+F again.
Or: On the Edit ribbon, in the Find And Replace section, click the Advanced icon.
The Advanced find and replace window opens.
You can start Find and replace directly from Project home: In Translations, do not open a document. Instead, just press Ctrl+H or Ctrl+F. When you do this, memoQ assumes that you want to run Find and replace on several documents, not just one.
What can you do?
In the Find what drop-down box, type the text you are looking for. Or, expand the drop-down list, and choose an expression from previous searches. (When you close memoQ, this list is cleared.)
To run a case-sensitive search: Click the Case sensitive icon.
Check the Replace check box (if it isn't checked already).
In the Replace with drop-down box, type the text that will replace the Find what text. Or, expand the drop-down list, and choose an expression from previous replacements. (When you close memoQ, this list is cleared.)
- To look in the target only: Clear the Source text check box, and make sure the Target text check box is checked.
- To look in the source only: Clear the Target text check box, and make sure the Source text check box is checked.
- To look in comments, too: Check the Comments check box.
- To look in the context identifiers of segments, too: Check the Context ID check box.
- Anything: Find the Find what expression, even if it's just part of a word.
- Only whole words: The Find what expression will be found only if whole words look like the expression.
- Entire segment/field: The Find what expression will be found only if the entire segment (or comment) is the same as the expression.
To keep formatting when replacing text: Check the Do not replace if formatting would change check box.
Tell memoQ which documents and segments it must search through: Under More find options, choose from the Search in drop-down box.
If you come from the translation editor, you have these choices:
If your project contains views, and you need to look for text in the views: On the Translations pane of Project home, click the Views tab first. Then press Ctrl+F. After that, the Search in drop-down box will offer these choices:
Some items may be missing: For example, you will not see Selected documents if no documents are selected. Or , if you have not opened a view, the Open views option will not be there.
- To jump to the first or the next match: Click Find next. memoQ jumps to the nearest segment where the Find what text occurs, and highlights the text. If necessary. memoQ will open or switch to the document where the match is.
The Advanced find and replace window stays open. You can even click the segment, make changes, and then return to the Advanced find and replace window.
- To replace the latest match: Click Replace this. memoQ replaces the match with the Replace with text. Then it jumps to the next match, and highlights it. The Advanced find and replace window stays open.
- To replace all occurrences in the open document: Click the little arrow next to Preview and replace, and choose Replace All. memoQ replaces every occurrence of the Find what text with the Replace with text. memoQ counts the occurrences, and shows the number on the right. When memoQ finishes replacing, it announces the result in the Find/Replace message box. To return to the Find and Replace window: Click OK. The Find and replace window stays open.
- To go through occurrences after you search through several documents: Click Find all. memoQ searches all the specified documents and segments, then displays a list of results on a separate document tab. This is best if you need to search many documents: It would take a lot of time to open each document in the translation editor. After the list opens, memoQ closes the Advanced find and replace window.
- To just mark the segments that contain matches: Next to Find all, click the little arrow, and choose Mark all. memoQ will search through the documents, and mark every segment that contains a match. memoQ will not open a list of matches. However, you can use filtering or views to get to these segments.
If you need to find several different things that still have something in common, you can use regular expressions. With regular expressions, you can write up patterns rather than the exact text you are looking for.
To use regular expressions: Next to the Find what box, click the Use regular expressions icon. The Advanced find and replace window will change like this:
Type your regular expression in the Find what box. Don't delete the (?i) characters from the beginning. If you are not sure what the regular expression should like, click the Information icon: The Regular expressions help page opens.
In the Replace with box, you can include the matching variables. Type $1 for the first recognized chunk; $2 for the second one; and so on. You can use these if you have previously clicked Use regular expressions icon, and there are replaceable groups (for example, (^s+)) in the Find what box. To learn more, see the Regular expressions help page.
All the other options are the same as in the normal view of the window. However, you have no more options on controlling the match: memoQ will find the regular expression regardless of where they occur or whether they cover an entire word or an entire segment.