Start a new topic

Substitution in non-translatables using regex

Hi folks,


Could someone please remind me (and perhaps a handful of other people) how this feature works in the non-translatables file?


It was announced a few releases ago (and a few computers ago in my case) and I don't have a backup to refresh my memory and start using it again.


I mean there's the pipe character at the start to indicate that a regex will folow, then the regex the equal sign and the replacement patterns. This much I remember.


If you could give me a link to the original release of this feature, it will be much appreciated.


Thanks,


Piotr


Here are some examples:

 

|(\bnach\sDIN\s)(\d+)\/(ISO\s)(\d+)=volgens DIN (2)/ISO (4)
|(\bvon\s)(\d+)(\sbis\s)(\d+)(\s\°C\b)=van (2) tot (4) °C
|(\bvon\smin\.)\s(\d+)\s(mm)\s(bis)\s(max\.)\s(\d+)\s(mm\b)=van min. (2) mm tot max. (6) mm
|(\d+)\.(\d+)\.(\d{4})=(1)-(2)-(3)
|(\d+\,\d+)\s…\s(\d+\,\d+)\s(Zoll\b)=(1) … (2) inch
|(ca\.\s)(\d+\-\d+)(\sMinuten)=ca. (2) minuten
|(nach\sDIN\s)(\d+)(\,\sTeil\s)(\d+)=volgens DIN (2), deel (4)
|\(gemäß\sDIN\sEN\s(\d+)\)=(volgens DIN EN (1))
|(\d+)(\.)(\s)(Januar|Jänner)(\s)(\d+)=(1) januari (6)
|(\d+)(\.)(\s)(Februar)(\s)(\d+)=(1) februari (6)
|(\d+)(\.)(\s)(März)(\s)(\d+)=(1) maart (6)
|(\d+)(\.)(\s)(April)(\s)(\d+)=(1) april (6)
|(\d+)(\.)(\s)(Mai)(\s)(\d+)=(1) mei (6)
|(\d+)(\.)(\s)(Juni)(\s)(\d+)=(1) juni (6)
|(\d+)(\.)(\s)(Juli)(\s)(\d+)=(1) juli (6)
|(\d+)(\.)(\s)(August)(\s)(\d+)=(1) augustus (6)
|(\d+)(\.)(\s)(September)(\s)(\d+)=(1) september (6)
|(\d+)(\.)(\s)(Oktober)(\s)(\d+)=(1) oktober (6)
|(\d+)(\.)(\s)(November)(\s)(\d+)=(1) november (6)
|(\d+)(\.)(\s)(Dezember)(\s)(\d+)=(1) december (6)
|(\d+\:\d+)\sbis\s(\d+\:\d+)\sUhr=(1) tot (2) uur
|(\d+)\sbis\s(\d+)\smm\b=(1) tot (2) mm
|(\d+)\sbis\s(\d+)\scm\b=(1) tot (2) cm
|(\d+)\sbis\s(\d+)\sm\b=(1) tot (2) m
|(\d)\.(\d+)((\s| )?)((A|a)(\.)?(M|m)(\.)?)=0(1):(2)(3)uur
|(10)\.(\d+)((\s| )?)((A|a)(\.)?(M|m)(\.)?)=10:(2)(3)uur
|(11)\.(\d+)((\s| )?)((A|a)(\.)?(M|m)(\.)?)=11:(2)(3)uur
|(1)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=13:(2)(3)uur
|(2)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=14:(2)(3)uur
|(3)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=15:(2)(3)uur
|(4)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=16:(2)(3)uur
|(5)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=17:(2)(3)uur
|(6)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=18:(2)(3)uur
|(7)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=19:(2)(3)uur
|(8)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=20:(2)(3)uur
|(9)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=21:(2)(3)uur
|(10)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=22:(2)(3)uur
|(11)\.(\d+)((\s| )?)((P|p)(\.)?(M|m)(\.)?)=23:(2)(3)uur

 

Thanks “alwayslockyourbike”, much appreciated. :-)  I'll take it from here.


I guess some newcomers to Cafetran may not know about this feature at all, so I guess putting it in the spotlight again may also help.



Same goes for term patterns: a treasure chest!

Could you enlighten me about term patterns as well? During  the past two years or so I have been shifting the bulk of my work to Cafetran whenever and wherever possible, as I am increasingly dissatisfied with Trados Studio (and the Windows operating system as well) so I guess refreshing on more features of Cafetran will not hurt.


A link will do. Thanks. :-)



Thanks again. So the changelog at github is the feature trail. :-)

Login to post a comment