The word boundary markers you used didn't work for me. I had to switch to 
"\b". When testing with \b punctuation seemed to mess up my test string. I 
switched to

(?<!\.)xx+
Note "x" = space

Using the double space leaves two spaces intact after a sentence if desired.
Tested with:
Now is the time for all good men to come to the aid of their country.  And 
now,  is an even  better   time, for all  good      men to come to the aid 
of      their country.   No really.

Result with one space in replacement field:
Now is the time for all good men to come to the aid of their country.  And 
now, is an even better time, for all good men to come to the aid of their 
country.  No really.


On Monday, January 14, 2019 at 12:05:13 PM UTC-5, Lewis Butler wrote:
>
> On 12 Jan 2019, at 18:32, Dj <[email protected] <javascript:>> wrote: 
> > I'm trying to replace spaces between words so a sentence like this: 
> > 
> > "this     line has      really   messed      up        spacing” 
>
> It doesn’t look to me like this was actually answered. All the replace 
> multiple space will replace ALL multiple spaces, not simply those between 
> words. 
>
>
> Grep search for: \> +\< 
> Replace with: “ “ # no quotes 
>
> Should do it. No need to involve perl at all. 
>
> (The pattern \> matches the “end of word boundary” and \< matches the 
> “start of word boundary”.) 
>
> -- 
> 'Can't argue with the truth, sir.' 'In my experience, Vimes, you can 
> argue with anything.’ 
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to