Using Regular Expressions as a Display Filter

I discovered today that you can use regular expressions to define display filters in the Editor view.  I’m not a regular expression expert at all but I did learn something about them earlier while trying to modify some of the sample expressions included in the QA Checker verification tool (such as reversing the function of the sample “Space between number and % sign” expression to flag if the space is missing, since there needs to be a space in Finnish).  Anyhow, today I wanted to review all segments that had numbers in them just to make sure I had used them correctly in my translation. Rather than skimming through the whole file searching for numbers, I thought that it would be great if I could filter the segments so that only segments with numbers would be shown in the Editor. While wondering about this, I entered a regular expression [1-9] (= any number from 1 to 9) in the Containing box on the Display Filter toolbar.  And it worked. Reviewing all the numbers in my translation was a breeze after that.

You can also use regular expression with the Find and Replace functions in the Editor view but I was surprised to see that it doesn’t seem to be possible to use them when performing searches in the Translation Memories view. I could see plenty of use for this feature in TM management.


2 Responses to “Using Regular Expressions as a Display Filter”

  1. James Whitehead Says:

    One thing I found anoying about the filter is that it doesn’t distinguish between 100% matches and context matches. I wanted to lock only context matches and leave all other strings unlocked but couldnt’ figure out how to do this except manually.
    Keep up the good blog. Some great info here which SDL should do a better job in disseminating themselves. Finding out about how to use SDL products usually means looking on other websites (proz, yahoo or linkedin groups) – not a good situation.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: