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

Bruno Depascale  Identity Verified
Local time: 23:11
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: 23:11
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: 23:11
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: 23:11
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

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 »
Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »

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