This site uses cookies.
Some of these cookies are essential to the operation of the site,
while others help to improve your experience by providing insights into how the site is being used.
For more information, please see the ProZ.com privacy policy.
batch find and replace non-breaking spaces and hyphens
Thread poster: Bruno Depascale
Bruno Depascale Italy Local time: 21:47 Member (2009) English to Italian + ...
Jun 22, 2017
Hi everybody, I'd like to ask your help about a really time-consuming process in trados studio. I often have to replace normal spaces with non-breaking spaces before the units of measure (like for example 10 mg). Is there a way to do this via the search and replace function? The same applies also to non-breaking hyphens, since if I paste a non-breaking hyphen in the search and replace box, trados automatically changes it to a normal hyphen. Thank you for your help!
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
_stephan Germany Local time: 21:47 English to German
Works in 2017
Jun 22, 2017
Hi Bruno,
I just tried this using Studio 2017 because I was fairly certain this should work, and as far as I can see it does:
I pasted a non-breaking space and non-breaking hyphen into the 'replace with' box and, while it's not discernible in the search dialog, it's definitely replacing with the correct characters.
When I type a non-breaking hyphen in the Studio editor (via ctrl+shift+hyphen), it appears as a purple tag. The replaced character looks like a ... See more
Hi Bruno,
I just tried this using Studio 2017 because I was fairly certain this should work, and as far as I can see it does:
I pasted a non-breaking space and non-breaking hyphen into the 'replace with' box and, while it's not discernible in the search dialog, it's definitely replacing with the correct characters.
When I type a non-breaking hyphen in the Studio editor (via ctrl+shift+hyphen), it appears as a purple tag. The replaced character looks like a regular hyphen, so I double-checked in the target file in Word and it really is non-breaking.
For pre-translation/auto-propagation you can also control this via the project settings: Language Pairs -> (your language pair) -> Translation Memory and Automated Translation -> Auto-substitution -> Measurements
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
NeoAtlas Spain Local time: 21:47 English to Spanish + ...
Some regex…
Jun 23, 2017
About the non-breakable space, you can use this string in the Find what box: (\d)[followed by a space]
and this string in the Replace with box: $1[followed by non-breakable space, i.e., ALT+0160]
Note: Texts in brackets and square brackets themselves ([])are just descricriptive. You have to remove them and replace them with spaces that I can't show here.
Tick Use and select Regular expressions. ... See more
About the non-breakable space, you can use this string in the Find what box: (\d)[followed by a space]
and this string in the Replace with box: $1[followed by non-breakable space, i.e., ALT+0160]
Note: Texts in brackets and square brackets themselves ([])are just descricriptive. You have to remove them and replace them with spaces that I can't show here.
Tick Use and select Regular expressions.
The press the Replace button for each instance with wish to get replaced.
Of course, you can try with other search and replace patterns, like: Find what: (\d) (mg) Replace with: $1[ALT+0160]$2
Exclusive discount for ProZ.com users!
Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value
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