Language Services<br />TranslateMedia<br />Accurate. Punctual. Confidential.<br />www.translatemedia.com<br />Professional...
Wildcards & Regular expressions<br />TranslateMedia<br />London  |  New York  |  Paris  |  Munich  |  Hong Kong<br />Accur...
This is a guide for the use of regexes in Word. Wildcards seem different according to the program you use them in (Google,...
Why?<br /><ul><li>Processing a fair word count
Preparing files for translation</li></ul>TranslateMedia<br />London  |  New York  |  Paris  |  Munich  |  Hong Kong<br />A...
Why?<br />Non-translatables = <br /><ul><li>Numbers
References in a catalogue
Names
Company registration names
etc</li></ul>TranslateMedia<br />London  |  New York  |  Paris  |  Munich  |  Hong Kong<br />Accurate. Punctual. Confident...
What?<br /><ul><li>Wildcard= </li></ul>	a keyboard character that you can use to represent one or many characters.<br />ex...
Common wildcards<br /><ul><li>? = a single character
* = any number of characters
! = any but the character that follows</li></ul>TranslateMedia<br />London  |  New York  |  Paris  |  Munich  |  Hong Kong...
Markers<br /><ul><li>< = beginning of a word
> = end of a word
^13 = ¶</li></ul>TranslateMedia<br />London  |  New York  |  Paris  |  Munich  |  Hong Kong<br />Accurate. Punctual. Confi...
Ranges<br />-> [ ]<br /><ul><li>[0-9] = any number
[3-6] = any number between 3 and 6 included
[a-z] = any lower case letter
[A-Z] = any upper case letter
[aAiI] = a or A or i or I
etc</li></ul>TranslateMedia<br />London  |  New York  |  Paris  |  Munich  |  Hong Kong<br />Accurate. Punctual. Confident...
Repetitions<br />-> { }<br /><ul><li>t{2} = tt
5{6,7} = 555555 or 5555555
Upcoming SlideShare
Loading in …5
×

Wildcards

809 views
742 views

Published on

This is the TranslateMedia guide for the use of regexes in Word.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
809
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Wildcards

  1. 1. Language Services<br />TranslateMedia<br />Accurate. Punctual. Confidential.<br />www.translatemedia.com<br />Professional Language Services<br />London | New York | Paris | Munich | Hong Kong<br />
  2. 2. Wildcards & Regular expressions<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  3. 3. This is a guide for the use of regexes in Word. Wildcards seem different according to the program you use them in (Google, Memoq,…)<br />Memoq has its own regex search feature (Auto-translatables window), but better use Word (easier + live double-checking)<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  4. 4. Why?<br /><ul><li>Processing a fair word count
  5. 5. Preparing files for translation</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  6. 6. Why?<br />Non-translatables = <br /><ul><li>Numbers
  7. 7. References in a catalogue
  8. 8. Names
  9. 9. Company registration names
  10. 10. etc</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  11. 11. What?<br /><ul><li>Wildcard= </li></ul> a keyboard character that you can use to represent one or many characters.<br />example: * in *.doc<br /><ul><li>Regular expression=  </li></ul> a combination of literal and wildcard characters that you use to match patterns of text.<br /> example: media[0-9]{3} matches media309, media110, etc<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  12. 12. Common wildcards<br /><ul><li>? = a single character
  13. 13. * = any number of characters
  14. 14. ! = any but the character that follows</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  15. 15. Markers<br /><ul><li>< = beginning of a word
  16. 16. > = end of a word
  17. 17. ^13 = ¶</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  18. 18. Ranges<br />-> [ ]<br /><ul><li>[0-9] = any number
  19. 19. [3-6] = any number between 3 and 6 included
  20. 20. [a-z] = any lower case letter
  21. 21. [A-Z] = any upper case letter
  22. 22. [aAiI] = a or A or i or I
  23. 23. etc</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  24. 24. Repetitions<br />-> { }<br /><ul><li>t{2} = tt
  25. 25. 5{6,7} = 555555 or 5555555
  26. 26. [A-Z]{4} = any sequence of four capital letters
  27. 27. [0-9]{3} = any sequence of three numbers
  28. 28. @ = one or more occurrences of previous character</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  29. 29. Note<br />If you want Word to find the actual characters usually used as wildcards, you have to type before these characters.<br /><ul><li>?
  30. 30. <
  31. 31. @
  32. 32. etc</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  33. 33. Example<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  34. 34. Copy-paste in WORD<br />Note: the search option does not support wildcards in the Notepad (TXT files).<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  35. 35. Find and Replace window<br />Ctrl + H<br />Click More > > button<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  36. 36. Find and Replace window<br />Tick Use wildcards box<br />Enter a space in the Replace with field<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  37. 37. Deleting all numbers?<br />-> [0-9]<br />BUT:<br />References made of numbers + capital letters will be left.<br /> -> [A-Z] ?<br />NO! <br />For some titles are written with an upper case.<br />PLUS: <br /><ul><li>Translators could argue about dates, values, etc
  38. 38. Numbers in title</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  39. 39. Word count in Memoq<br />Trados-like word count does not count numbers (isolated sequences of numbers)<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  40. 40. Though…<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  41. 41. Regular expressions<br /><ul><li> UX[0-9]
  42. 42. [A-Z]{4}[0-9]{2,3}[A-Z]{2}[0-9]</li></ul>([A-Z]{4})([0-9]{2,3})([A-Z]{2})[0-9]<br /> -> You can add brackets to make it clearer. They will not be taken into account in the search.<br /> But you cannot add spaces, for they are searched for as characters.<br /> If you want to search for brackets, you have to put them between square brackets.<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  43. 43. [A-Z]{4}[0-9]{2,3}[A-Z]{2}[0-9]*^13·x·<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  44. 44. Conclusion<br /><ul><li>Look through the whole document for different non-translatable patterns
  45. 45. When creating a regex, make sure it will not delete anything you need to count
  46. 46. Still a rough count, unless you spend time going into details (counted as repetitions then)</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  47. 47. Links<br /><ul><li>http://office.microsoft.com/en-us/help/ha010873051033.aspx
  48. 48. http://office.microsoft.com/en-us/help/HA010873041033.aspx
  49. 49. http://word.mvps.org/FAQs/General/UsingWildcards.htm</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  50. 50. In Memoq (Auto-translatables)<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  51. 51. In Memoq (Auto-translatables)<br />PATTERN:<br /><ul><li>(d) = any number
  52. 52. (d+) = any number of numbers</li></ul>REPLACEMENT RULE:<br /><ul><li>$1
  53. 53. $2 -> according to position in digit sequence
  54. 54. $3 …</li></ul>TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />
  55. 55. Link<br />http://en.wikibooks.org/wiki/CAT-Tools/MemoQ/Tips_and_Tricks#Using_auto-translatables_for_number_format_conversion<br />TranslateMedia<br />London | New York | Paris | Munich | Hong Kong<br />Accurate. Punctual. Confidential.<br />

×