Notice that \s includes line feeds/carriage returns/form feeds, so perhaps it 
is not what you want.

For just spaces and tabs you may try [^ \t]+ (user manual, p. 187).

Nestor

===============================================

> On 12 Feb 2019, at 10:42, Sam Hathaway <[email protected]> wrote:
> 
> This would seem to remove any m character that is followed by one or more 
> spaces, so I don’t think it quite does what you asked for. Not sure why it 
> would be faster either.
> -sam
> 
> On 12 Feb 2019, at 7:38, @lbutlr wrote:
> 
> I asked someone how to remove all spaces in an string more efficiently and he 
> responded with
> 
> search: (m?)\s+
> replace: (nul)
> 
> which sure does work.
> 
> But WHY?
> 
> That is, I know what this does, but I don't understand the syntax
> 
> 
> -- 
> Major Strasser has been shot. Round up the usual suspects.
> 
> -- 
> 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.
> 
> 
> -- 
> 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.

-- 
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