POSIX is not implemented in Sigil. In this case it wouldn't help you anyway unless you are planning on doing a one-by-one replacement rather than Replace All.
Think what would happen to this: "Hello!"
My guess is that it would become " Hello! "
Try this for your search:
Find: ([^\nA-z0-9 -“/])([^ \n”])
Repl: \1 \2
In the Find string there is a space between the 9 and the dash. See below for quotes.
In the Repl string there's a space between the \1 and \2.
You will need to tweak it to suit your needs by adding, in the Find string, any punctuation you do not want followed by a space.
For example if you're using it in Code View then use this Find string: ([^\nA-z0-9 -“/<>])([^ \n”]) to avoid angular brackets having spaces added after.
The problem is quotes. If you can, make the double quotes curly - the first one of the type that occurs at the start of a quote (opening) and the second one of the type that ends a quote (closing). The text being searched must also have curly quotes.
Interestingly the search string does not find square brackets or the '&' not followed by a space. Sort of convenient!
Last edited by Faster; 05-20-2011 at 02:36 PM.
|