Reputation: 5818
I'm trying to match all spaces and convert to escaped spaces, but only those which do not occur at the end of a line, so far I've tried /\ !$/\\\ /g
to and general button mashing around that point.
Upvotes: 1
Views: 152
Reputation: 13460
use this regular expression (?m)( +)(?!$)
(?m)
regex option multyLine
( +)
> 0 spaces
(?!$)
is not end of line
Upvotes: 3