Forum: Transit support
Topic: Find/replace thousand separators and decimal points using regex within Transit
Poster: Steveling2
Hello,
I've been asked at work to look into ways of finding and replacing thousand separators and decimal points in the target text within Transit (Version 4.0 SP7 Build 1268.14). Essentially we're trying to emulate the auto-localization function in Trados (and no, we can't switch to another software). The suggestions in the Regular Expressions section of Transit's Advanced Features manual work to some extent. For example,
Find: #([0-9]+)0\.#([0-9]+)1
Replace: #0,#1
will convert:
1.0 to 1,0
1.00 to 1,00
1.000 to 1,000
But then it gets trickier:
1.000.000 becomes 1,000.000
What's more, dates are also converted:
01.01.1900 becomes 01,01.1900
I've now spent quite some time experimenting, and as Transit appears to use its own flavour of regex there's no point in using a site like regexhero.net for testing. Is there a solution that doesn't ignore a second (or even third) thousand separator, but does ignore the sequence xx.xx.xxxx?
Thanks,
Steve
Topic: Find/replace thousand separators and decimal points using regex within Transit
Poster: Steveling2
Hello,
I've been asked at work to look into ways of finding and replacing thousand separators and decimal points in the target text within Transit (Version 4.0 SP7 Build 1268.14). Essentially we're trying to emulate the auto-localization function in Trados (and no, we can't switch to another software). The suggestions in the Regular Expressions section of Transit's Advanced Features manual work to some extent. For example,
Find: #([0-9]+)0\.#([0-9]+)1
Replace: #0,#1
will convert:
1.0 to 1,0
1.00 to 1,00
1.000 to 1,000
But then it gets trickier:
1.000.000 becomes 1,000.000
What's more, dates are also converted:
01.01.1900 becomes 01,01.1900
I've now spent quite some time experimenting, and as Transit appears to use its own flavour of regex there's no point in using a site like regexhero.net for testing. Is there a solution that doesn't ignore a second (or even third) thousand separator, but does ignore the sequence xx.xx.xxxx?
Thanks,
Steve