find replace function for numbers in word Thread poster: monitor
| monitor Local time: 23:44 English to German + ...
I am desperately looking for a solution to find replace English commas with points and vice versa in a large word document. The problem is that there are large numbers with 9 numbers and 2 decimals as well as percent numbers with only 4 numbers. I was unable to locate the correct "replace with" wildcards in order to leave the original numbers unchanged and just replace the commas/points. Any help very welcome as the client insists that we have to do this in order to get the job... See more I am desperately looking for a solution to find replace English commas with points and vice versa in a large word document. The problem is that there are large numbers with 9 numbers and 2 decimals as well as percent numbers with only 4 numbers. I was unable to locate the correct "replace with" wildcards in order to leave the original numbers unchanged and just replace the commas/points. Any help very welcome as the client insists that we have to do this in order to get the job and others to come. Kind regards Marcel ▲ Collapse | | | Heinrich Pesch Finland Local time: 00:44 Member (2003) Finnish to German + ... | Endre Both Germany Local time: 23:44 English to German Wildcards in Word | Sep 6, 2009 |
Find what: ([0-9]),([0-9]) Replace with: \1.\2 This replaces all commas between two numbers with a dot. Inverse comma and dot to do it the other way around. | | | Adam Łobatiuk Poland Local time: 23:44 Member (2009) English to Polish + ... Small correction | Sep 6, 2009 |
Endre Both wrote: Replace with: \\1.\\2 FTFY
[Edited at 2009-09-06 11:01 GMT] | |
|
|
Endre Both Germany Local time: 23:44 English to German Thanks for the correction, Adam | Sep 6, 2009 |
In the preview it all looked fine, but then ProZ.com’s forum software ran away with my two backslashes. To make sure, I'll try it again: \1 \2 ...and sure enough, the backslashes are gone. I'll submit a support request to bring preview and final view in line.
[Módosítva: 2009-09-06 14:04 GMT] | | | Jaroslaw Michalak Poland Local time: 23:44 Member (2004) English to Polish SITE LOCALIZER
The only problem with Endre's solution is that when you change all commas to dots, you can no longer distinguish which dots should be changed to commas... If you start with: 1.000,01 and change it as Endre suggests, you end up with: 1.000.01 Obviously, you cannot change the dots to commas now, as you'll get: 1,000,01 which is not what you want... The easiest way is to use a placeholder, e.g.: ... See more The only problem with Endre's solution is that when you change all commas to dots, you can no longer distinguish which dots should be changed to commas... If you start with: 1.000,01 and change it as Endre suggests, you end up with: 1.000.01 Obviously, you cannot change the dots to commas now, as you'll get: 1,000,01 which is not what you want... The easiest way is to use a placeholder, e.g.: ([0-9]),([0-9]) to \\1###\\2 then ([0-9]).([0-9]) to \\1,\\2 and ### to \\1.\\2 You can work around this using the number of digits, but then you must know that the number of decimal places in text is fixed (e.g. always two digits after the decimal point). ▲ Collapse | | | Endre Both Germany Local time: 23:44 English to German Changing back and forth in the same document? | Sep 6, 2009 |
Jabberwock wrote: The only problem with Endre's solution is that when you change all commas to dots, you can no longer distinguish which dots should be changed to commas... I assumed that in one document, the change always goes in one direction only. I have some difficulty imagining a scenario where this would not be the case, maybe the OP could clarify. | | | Jabberwock is right | Sep 6, 2009 |
If you want to swap points to commas and commas to points, you need an intermediate replacement: 1) Commas to placeholder: 1,000.00 becomes 1###000.00 2) Periods to commas: 1###000.00 becomes 1###000,00 3) Placeholders to periods: 1###000,00 becomes 1.000,00 Otherwise you would eliminate all commas with the first replacement: 1) Commas to periods: 1,000.00 becomes 1.000.00 2) Periods to commas: 1.000.00 becomes 1,000,00 Regard... See more If you want to swap points to commas and commas to points, you need an intermediate replacement: 1) Commas to placeholder: 1,000.00 becomes 1###000.00 2) Periods to commas: 1###000.00 becomes 1###000,00 3) Placeholders to periods: 1###000,00 becomes 1.000,00 Otherwise you would eliminate all commas with the first replacement: 1) Commas to periods: 1,000.00 becomes 1.000.00 2) Periods to commas: 1.000.00 becomes 1,000,00 Regards, Daniel ▲ Collapse | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » find replace function for numbers in word CafeTran Espresso | You've never met a CAT tool this clever!
Translate faster & easier, using a sophisticated CAT tool built by a translator / developer.
Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools.
Download and start using CafeTran Espresso -- for free
Buy now! » |
| TM-Town | Manage your TMs and Terms ... and boost your translation business
Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.
More info » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |