Use regular expression to insert non-breaking space
Thread poster: Dominika Lupa
Dominika Lupa
Dominika Lupa  Identity Verified
Poland
Local time: 09:47
English to Polish
+ ...
Jan 12, 2021

Hi, does any of you know how to insert non-breaking spaces in the target text in Memsource Editor in the same way as it works in Trados Studio? So far I have been doing it one-by-one, but it's time consuming...

In case of Polish single-letter words, in Studio it's possible to:

search in Regular expressions

Find:
(\u0020((art\.)|(ust\.)|([a|i|o|u|w|z|r])))(\u0020)
Replace
$1 (dollar1nonbreakingspace)

In the above manner I repla
... See more
Hi, does any of you know how to insert non-breaking spaces in the target text in Memsource Editor in the same way as it works in Trados Studio? So far I have been doing it one-by-one, but it's time consuming...

In case of Polish single-letter words, in Studio it's possible to:

search in Regular expressions

Find:
(\u0020((art\.)|(ust\.)|([a|i|o|u|w|z|r])))(\u0020)
Replace
$1 (dollar1nonbreakingspace)

In the above manner I replace all normal spaces after this single-letter words to non-breaking spaces at once. Is it somehow possible in Memsource?


I'd be very grateful for any advice regarding this
Collapse


 
David Turnbull
David Turnbull
United Kingdom
Local time: 08:47
Italian to English
Regex find/replace on Memsource desktop Jan 29, 2021

Hi,

You can do a find/replace using regex on the Memsource desktop app (as far as I know, the functionality does not exist on the web platform).

As for the individual regex, you need to convert your existing expression from the "regex flavour" Net (Trados) to Posix ERE (Memsource). You can do this using Regex Buddy or by writing a new expression based on the instructions in Memsource manual.


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 11:47
English to Russian
Hi David Jan 29, 2021

David Turnbull wrote:
You can do a find/replace using regex on the Memsource desktop app (as far as I know, the functionality does not exist on the web platform).

As for the individual regex, you need to convert your existing expression from the "regex flavour" Net (Trados) to Posix ERE (Memsource). You can do this using Regex Buddy or by writing a new expression based on the instructions in Memsource manual.

When I asked Memsource support, they said:
I am afraid it is not possible. A non-breaking space can be inserted by Ctrl+Shift+Space or by clicking on Edit - Insert symbol - Non-breaking space. However, it can be done only individually.

Can you please elaborate on this? How can I use Regex Buddy or write a new expression based on the instructions in Memsource manual (is there any link available to reach those instructions)?


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 11:47
English to Russian
Partial solution Jan 29, 2021

@Dominika Lupa
I know how to replace single-char words provided they are not at the beginning of a sentence.
Once you are done with your translation, export it into a 2-column DOCX file and replace as follows:

Find what: ( [aiouwzr])( )
Replace with: \1_

In the 'Find what' field, there is one normal space after each opening parenthesis.
In the 'Replace with' field, the sign _ refers to a non-breaking space (Alt+0160 on numpad)

*In M
... See more
@Dominika Lupa
I know how to replace single-char words provided they are not at the beginning of a sentence.
Once you are done with your translation, export it into a 2-column DOCX file and replace as follows:

Find what: ( [aiouwzr])( )
Replace with: \1_

In the 'Find what' field, there is one normal space after each opening parenthesis.
In the 'Replace with' field, the sign _ refers to a non-breaking space (Alt+0160 on numpad)

*In Memsource and MS Word, expressions like \1, \2, \3, etc. = $1, $2, $3, etc. in Trados.

Then you can import the docx file back to Memsource and confirm all.
However I don't know how to include single-char words at the beginning of sentences. You can filter them by regex: ^(\ba\b|\bi\b|\bo\b|\bu\b|\bw\b|\bz\b|\br\b)
and then edit them manually.
Collapse


 
Dominika Lupa
Dominika Lupa  Identity Verified
Poland
Local time: 09:47
English to Polish
+ ...
TOPIC STARTER
Thank you Stepan :) Feb 1, 2021

That is very helpful, I'm grateful

 


There is no moderator assigned specifically to this forum.
To report site rules violations or get help, please contact site staff »


Use regular expression to insert non-breaking space






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »