![]() So for example the first part of my regex that looks for the year is this: To do this you use brackets in this format (). This is simply a way of finding a pattern and remembering it. Now, in order to use a replacement regex we have to create what is called a back reference. In this example you could use this pattern because the source was yyyy-mm-dd and when going from de(DE) to en(GB) this short format can stay the same: To do this you first have to find the dates. Using a regex replacement you can effect this after the event, so translate the file allowing Studio to do its thing and then at the end replace the date. It can convert the short date format in one language to the short date format in another language… but not switch from short to long. Studio cannot convert a short date to a long date. The translation was supposed to return a date in this format: So, what do I mean by this exactly? Well, I had a good example a few months ago where a user was provided with a source file containing dates like this: This capability, to use regex to replace as well as search, will only be possible with the update release of SDL Trados Studio 2011 SP2 and later and it’s a very welcome addition to the toolset provided within Studio. ![]() The final article (in this introductory series anyway) on regular expressions in Studio is looking at how to use search and replace in Studio.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |