Two small tips:

* You can replace [^ ] with \S.

\S means match a non-whitespace character, and will work slightly faster, however neglegible.

* A dot does not need escaping if it's in a character class as it loses its meta meaning within it.


Gone.