How to remove extra space(s) in the beginning of a sentence?
Thread poster: Chunyi Chen
Chunyi Chen
Chunyi Chen
United States
Local time: 11:37
English to Chinese
Aug 30, 2012

Hi! Does anyone know if there is a macro or an ahk script that will remove the extra space(s) at the start of each Chinese sentence in a Word file? I don't remember experiencing such a problem in MemoQ 5, but since I migrated to MemoQ 6, I found it doing a great job maintaining the formatting of the source text (no sarcasm intended). Unfortunately this does not work with my language pair. In character-based Chinese, you don't put a space between sentences. Trados does a good job in removing... See more
Hi! Does anyone know if there is a macro or an ahk script that will remove the extra space(s) at the start of each Chinese sentence in a Word file? I don't remember experiencing such a problem in MemoQ 5, but since I migrated to MemoQ 6, I found it doing a great job maintaining the formatting of the source text (no sarcasm intended). Unfortunately this does not work with my language pair. In character-based Chinese, you don't put a space between sentences. Trados does a good job in removing these extra spaces when it cleans up a document. Now that I don't use Trados to process my files anymore, is there a quick and easy way to remove these unnecessary spaces in Word? Any suggestions are very appreciated.

As additional info, these extra spaces are seen after a Chinese period or after a colon. They are "between" segments in MemoQ, so there is no way for me to identify and fix them in MemoQ.

Thank you.

Chun-yi
Collapse


 
David Wright
David Wright  Identity Verified
Austria
Local time: 20:37
German to English
+ ...
search and replace Aug 30, 2012

Can you not simply replace ". " by "."?

 
Ann Kapborg
Ann Kapborg  Identity Verified
Sweden
Local time: 20:37
Member (2012)
English to Swedish
+ ...
Search and replace with special characters Aug 30, 2012

Hi!

If the extra space is after a paragraph:

Search for: ^p (paragraph char) and space.
Replace with: ^p.


You will also have the opportunity to choose them in the Search and Replace form.

I there is a period and spaces you want to replace, you can search and replace that too.


When searching and replacing like this, always do it on a copy and make sure the criteria are unique.


Greetings,
... See more
Hi!

If the extra space is after a paragraph:

Search for: ^p (paragraph char) and space.
Replace with: ^p.


You will also have the opportunity to choose them in the Search and Replace form.

I there is a period and spaces you want to replace, you can search and replace that too.


When searching and replacing like this, always do it on a copy and make sure the criteria are unique.


Greetings,

Ann

[Edited at 2012-08-30 16:05 GMT]

[Edited at 2012-08-30 16:05 GMT]
Collapse


 
Chunyi Chen
Chunyi Chen
United States
Local time: 11:37
English to Chinese
TOPIC STARTER
Both suggestions didn't seem to work Aug 30, 2012

Hi David and Wrenda,

Thank you for your suggestions. I tried them on my file and they didn't seem to work. What I am trying to achieve is:
Changing XXXXXX。 YYYYY: ZZZ
to
XXXXXX。YYYYY:ZZZ

Thank you for your help.

Chun-yi


 
István Hirsch
István Hirsch  Identity Verified
Local time: 20:37
English to Hungarian
If it was English... Aug 31, 2012

In Word, I would go to Edit/Find and Replace, check „Wildcards” checkbox and

Find:
[_]{2,}

Replace with:
_

(here ’ _’ means a space, not underscore) to replace any sequence of more than one spaces with only one.
Perhaps your Word version syntax needs a semicolon after 2, not a comma.


 
Chunyi Chen
Chunyi Chen
United States
Local time: 11:37
English to Chinese
TOPIC STARTER
a simple solution Aug 31, 2012

Marton from Kilgray tried a simple way that uses find and replace in Word and it worked!

Find (type one space here)
Replace (leave blank)

I didn't know it could be so simple.

Thank you all for your help.

Chun-yi


 


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


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

How to remove extra space(s) in the beginning of a sentence?






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 »
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! »