Replace regular space before or after all tags with a non-breaking space - any Regex solutions?
论题张贴者: LEXpert
LEXpert
LEXpert  Identity Verified
美国
Local time: 20:06
正式会员 (自2008)
Croatian克罗地亚语译成English英语
+ ...
Dec 26, 2022

I have a ton of high matches where the only difference from the TM is that parts of each segment are bolded and surrounded by tags, with a non-breaking space added before and after each tag. Surely there must be some way to replace the spaces all at ones?

 
Stepan Konev
Stepan Konev  Identity Verified
俄罗斯联邦
Local time: 04:06
English英语译成Russian俄语
Regex Dec 26, 2022

Find what: [whitespace](<.*?>)
Replace with: [nbsp]$1
To type a nbsp press and hold Alt and type 0160 on the numpad.
Also remember to check the box 'Search within tags'


[Edited at 2022-12-26 22:22 GMT]


 
LEXpert
LEXpert  Identity Verified
美国
Local time: 20:06
正式会员 (自2008)
Croatian克罗地亚语译成English英语
+ ...
主题发起人
Works like a charm! Dec 26, 2022

Thank you Stepan! This is exactly what I need.

 


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


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

Replace regular space before or after all tags with a non-breaking space - any Regex solutions?






Wordfast Pro
Translation Memory Software for Any Platform

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

Buy now! »
Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »