Inserting Non-breaking Spaces before Numbers

It is a good habit to insert non-breaking spaces before numbers and SI units (second, kelvin, ampere etc.) to keep all text together when word-wrapping.

Here are some useful Search and Replace commands to insert non-breaking spaces into a translation project:

Replace any space before a digit with a non-breaking space

Search for:

\s(?=\d+)

Replace with:

non-breaking space

Replace any space before a bracket + digit with a non-breaking space

Search for:

\s(?=\(\d+)

Replace with:

non-breaking space

Note: On a Mac you insert the non-breaking space with Option+Space, on Windows with …

clip.png

See also Inserting Non-breaking Spaces Before Units

Click here for Information about regular expressions in Java

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License