Trados Studio
Trados Enterprise
Trados Team
Trados GroupShare
Trados Business Manager
Passolo
MultiTerm
RWS AppStore
Connectors
Beta Groups
Managed Translation
MultiTrans
TMS
WorldServer
Language Weaver
Language Weaver Connectors
Language Weaver Edge
Tridion Docs
Tridion Sites
LiveContent S1000D
XPP
Language Developers
Tridion Docs Developers
Community Help
RWS User Experience
Internal Trados Ideas Community
Mercury
RWS Community Internal Group
RWS Training & Certification
Style Guides
RWS Campus
RWS Enterprise Technology Partners
Trados Approved Trainers
ETUG (European Trados User Group) Public Information
Nordic Tridion Docs User Group
Tridion West Coast User Group
Trados Studio Ideas
Trados GroupShare Ideas
Trados Team Ideas
Trados Team Terminology Ideas
Trados Enterprise Ideas
Trados Business Manager Ideas
MultiTerm Ideas
Passolo Ideas
RWS Appstore Ideas
Tridion Docs Ideas
Tridion Sites Ideas
Language Weaver Ideas
Language Weaver Edge Ideas
Managed Translation - Enterprise Ideas
TMS Ideas
WorldServer Ideas
LiveContent S1000D Ideas
Contenta S1000D
XPP Ideas
Events & Webinars
To RWS Support
Detecting language please wait for.......
What is the correct Regular Expression to be inserted in "Find What" and the Regular Expression to be inserted in "Replace With" (using Regular Expressions) in Trados Studio Editor (2017 to 2021) in order to add one or more thousand separators as dot(s) in numbers like 1000; 10000; 100000, 10000000; 1000000000000; 20000; 1245; 35938; 5000; 50000 on several Translated Target Segments etc.?For example a huge number of Target Segments show only numbers:
1000
10000
100000
1000000
10000000
100000000
1235567980
1245
34589
50000
500000
The above number should be modified to:
1.000
10.000
100.000
1.000.000
10.000.000
100.000.000
1.235.567.980
1.245
34.589
50.000
500.000
I found some Regular Expressions in Internet that could add thousand separators, but they do not work in Trados Studio!
Thank you very much for your kind attention.
Best regards.
Renato Colonna Rosman Kelly Edward
The problem, it seems, isn't with the regular expression. The problem is that Trados Studio, all versions, doesn't handle the replace. It'll find the correct…
tiny toy
Just OneClick away..
Renato Colonna Rosman
You could use something like this:
Search for:
\d(?=(?:\d{3})+(?!\d))
Replace with:
$0,
Dear Paul
Thank you very much for your kind attention, but the regular expression did not work in Trados Studio 2021 SR2 - 16.2.10.9305.
I selected, for example, the Target Segment containing only 16825.
Then I inserted the expression \d(?=(?:\d{3})+(?!\d)) in "Find What",
then I inserted the expression $0. (because I want to insert thousand dot separator) in "Replace with",
then I selected "Look in" (Selection), then I chose "use" Regular expressions",
when I click on "Find Next", the cursor selects the number "[6]",
when I click on "Replace", I read the answer: "Find complete: no matches found". No thousand separator is inserted. I other words, the number 16825 is not modified to 16.825, it remains as 16825.
The correct Regular Expressions for Trados Studio should be related to ".NET implementation". I have tested several Regular expressions (.NET implementation) in order to insert one or more thousand separators (as dot (.)) in numbers, but without any success.
Best regards
Renato Colonna Rosman said:Thank you very much for the solution using the SDLXLIFF Toolkit!
You're welcome. A big advantage here is you can do all the files in your project in one go with this plugin and because it's only regex it's easy to adapt as needed to suit what's in your actual document.
The solution using the SDLXLIFF toolkit, as you explained in your Video, is good in order to insert thousand separators (using regex) in each number equal to or greater than 1000 on each Target Segment, including year numbers and reference document page numbers.
Is there a means to insert thousand separator only on some selected Target Segments containing only numbers equal to or greater than 1000 from a Table relating to numerical measured values?
I wait for your answer as soon as possible.
I have made it. It is a Paid service.
could be made in version2021 too, currently version2017
- psst, I have read your comment as "more than 1000" mistakenly.
Hi Renato Colonna Rosman,
You can simply run the below replacement several times to achieve what you want: Find what: (\d)(\d{3})\b Replace with: $1.$2 It works even with numbers preceded or followed by anything else (e.g., "Only 1000 $", "My 1235567980 rubles", "34589 any text"). In your case, you have to run the replacement 3 times to cover all segments. ====== Also, you can use Regex Match AutoSuggest Provider (from RWS appstore) to get suggestions on the go: ====== Also, if you use AHK, you can ask for a script at the RWS AHK forum (if you think 3 clicks are too much ).
it does not work
Kelly Edward said:it does not work
It does. Try reading the original post and examples.You just suggest a different case and scenario. Cases can be different, right. But my solution works fine for the original case. If the original poster had anything different like 1234Times, they would put it straight in the list of examples. When a different case arises, I will suggest a different solution.
testing is testing.. never mind
Good Luck To You
Kelly Edward said:another testing
Another scenario you mean? Right, this is another scenario. Has nothing to do with the original inquiry.
I have tested mine too.In above both cases, it never worked out too.
Regards
The regex works as designed: place a period before a series of 3-digits preceded by a digit and not followed by a digit. 1234