Start a new topic

Trimming leading "Japanese" spaces in TMs

Japanese writers often use leading spaces as place holders.


image



If you want to delete the leading spaces in the TM for one reason or another, the following regular expression works.


Open the Find & Replace pane, and enter in the Find field:


\A[\s| ]+


Note that the space on the right side of the | character is a so-called "double-byte" or "double/full-width" space (often used in Japanese texts), and you have to type it there. It is a character that cannot be caught by \s.


Note: An alternative regex is \A[ | ]+

Notice the | character between a single-byte space and a double-byte space that have been typed.


Leave the Replace field blank, and choose "Regular expression."


Now, you can find those leading spaces and replace them with nothing (i.e., cut them off).



image


Login to post a comment