A few days ago I posted a Substack Note for the article discussing regexes for filtering, find & replace of time expressions in which I showed an Excel view of the regular expressions shared in the article. But I didn’t explain at the time how I got there.
When I originally began thinking about ways to re-use my collections of regular expressions for translation work, I was thinking of the individual expressions and how I might present these in something like a book. I spent quite a bit of time fiddling around in Microsoft Word, building an example page as I might like to see it, copying and pasting from my exported library in XML, which I had opened in Notepad++. That was a lot of work, and if I were to do that for the more than 100 expressions I thought to share, that would take far too much time.
So I wrote an XSL script to transform exported Regex Assistant libraries into a similar structure in HTML, which of course I can open and edit in Microsoft Word, saving a lot of time.
Instructions for how that works using a free web page to perform the transformation of the exported regexes are in this PDF file:
At the time I didn’t consider conversions to other formats, as one can easily search the HTML in a web browser and copy/paste expressions into other environments such as Trados Studio, Phrase, Wordfast, Xbench, etc.
However, not everyone is going to get along well with a huge HTML file with tons of text. When I teach people to use prepared expressions to get actual work done, we don’t tackle 100+ regexes all at once. That would be pointless and overwhelming. Instead, we focus on just a few expressions related to one or two tasks. Like the six regexes used for finding and fixing time expressions in English.
Someone not yet intimately familiar with the Regex Assistant in memoQ might feel uncomfortable finding and using the few expressions needed for checking a particular job and a few issues that may need correction. It’s not hard to filter a large library and find just the bits needed, but most of us will need some practice time to be fully comfortable doing that.
So how can we make things easier for a start?
Why not take the regexes for the job and put them in some sort of pretty table where they can be examined and applied in a focus way without getting overwhelmed by a big, whoppin’ library? Thus the video in this post.
This may also be more helpful when you need to share your regex treasures with people who work with other tools, or maybe you will find it easier to apply such Excel tables on occasions where you get stuck using some other environment where you miss your memoQ Regex Assistant.
What you do is a matter of personal judgment and convenience. But as you can see, it takes little time to transform scary XML exports of the regex library into easy-to-handle Excel, which is probably also better to present in discussions about tasks to be performed with the help of regular expressions.
If you maintain your collection of regular expressions in the memoQ Regex Assistant using sensible names, keywords and descriptions, a task-focused list for export can probably be created in less than a minute. Another minute to make that Excel spreadsheet from the export and you’re good to go!
Share this post