You can use a
negative look ahead
Here is a
PCRE regex cheatsheat that may help.
So a find of a punctuation symbol [:punct:] followed by the negative lookahead (?! ) should find punctuation not followed by a space. Unfortunately, it would also find any punctuation with no following space at the beginning of the word…. So you might want to add a negative look behind to make sure there is no preceding space as well (?<! )
Find: (?<! )([:punct:]+?)(?! )
Replace: ‘\1 ‘ (a space after the 1 with no quotes)
Warning: I reserve the right to be wrong. I haven’t tested this and am writing from my phone in a post-surgery drug-induced euphoria…:eek:
TEST THOUROUGHLY and save often. Sigil has some awesome new features that can help with making save points and seeing what changes will be made before you commit.
Also, I’m quite sure there are other ways of doing this; maybe even more elegant.