Source-side regular expressions

Imagine that you have to translate a technical Word document that contains segments like:

1.png

CafeTran allows you to use regular expressions like \d+ for one or more digits and [„“]* for zero or more quote characters at the source side of your glossary.

There are 2 different ways of activating recognition of regular expressions in your Glossary.

The first is to start the glossary entry with a pipe character (|).

The second way is to set up a special Glossary just for regular expressions by setting the ‘Regular expressions only’ flag for the Glossary in question. This can either be done when creating the Glossary, or by selecting the relevant Glossary in the tabbed pane and then selecting: Glossary > Edit Glossary info, and checking ‘Regular expressions only’.

Note that at target side of the glossary entries you can use a zero.

2.png

CafeTran recognises the glossary entries and inserts the correct numbers at target side.

3.png

All instances of Not-Aus-Schalter have been auto-assembled correctly, regardless of the presence of quote characters, EN, EM or ‘normal’ dashes between ‘Not’ and ‘Aus’:

4.png

Another nice example:

  • Add these regular expressions to your glossary:
6.png
  • To get this result:
5.png

You can find a complete list of all characters used in regular expressions at:

http://docs.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html

More

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License