batch find and replace non-breaking spaces and hyphens
Thread poster: Bruno Depascale

Bruno Depascale  Identity Verified
Local time: 08:13
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!


_stephan  Identity Verified
Local time: 08:13
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 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

Does that help you?



Local time: 08:13
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.

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

I hope this helps you,

… Jesús Prieto …


Bruno Depascale  Identity Verified
Local time: 08:13
Member (2009)
English to Italian
+ ...
it works Jun 23, 2017

Thank you Jesús and Stephan, your answers have been very helpful!
Have a great day!


To report site rules violations or get help, contact a site moderator:

You can also contact site staff by submitting a support request »

batch find and replace non-breaking spaces and hyphens

Advanced search

memoQ translator pro
Kilgray's memoQ is the world's fastest developing integrated localization & translation environment rendering you more productive and efficient.

With our advanced file filters, unlimited language and advanced file support, memoQ translator pro has been designed for translators and reviewers who work on their own, with other translators or in team-based translation projects.

More info »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »

  • All of
  • Term search
  • Jobs
  • Forums
  • Multiple search