You can use regular expressions when finding and replacing text in the Editor view and Translation Memories view. To do this, you must first select the Use Regular Expressions option in the Find and Replace dialog box. You can display this dialog box by selecting Edit > Find or Edit > Replace.
You can use regular expressions in your search criteria. For example, you could search segments that contain email addresses in the text. Regular expressions are used to search text for all occurrences of a particular sequence, or pattern, of characters. They differ from standard search tools because they use special metacharacters. Metacharacters enable you to create a single regular expression that will find all occurrences of a basic pattern and also specific variations of the pattern.
This tool is for users who know how to create and use regular expressions.
Studio uses the .Net syntax for regular expressions. For more information on how to use regular expressions, see http://www.regular-expressions.info/reference.html.
If you used a regular expression as part of the Find criteria, you can use a regular expression in the Replace box to do substitutions in the target segments. The regular expression is used to generate the text that will replace the matched text in the Find criteria.
You could use this feature to change the order of words in a sentence across all occurrences of that sentence.
Use this regular expression in the Find box:
It finds matching sentences in the document where XYZ represents the field name:
For example, it might find the following sentences:
Use this regular expression in the Replace box:
It changes the sentence order of the matched sentences to the following where XYZ represents the field name:
For example, this changes the order of the matched sentences to the following:
For more information on how to use substitution regular expressions, see for example http://msdn.microsoft.com/en-us/library/ewy2t5e0.aspx.
Using Wildcards in Find and Replace
How to Find and Replace Text in the Translation Memories View
How to Find Text in the Editor View
How to Find and Replace Text in the Editor View
Topic: Published: 27-Jun-2012