Seems like an odd search string. The (m?) would be to capture a patten for 
an optional m before your space. If you're just wanting to get the spaces I 
don't know why you would include this when the \s would get them all with a 
replacement of null and selecting the replace all option. Including the 
pattern (m?) would also get the m's if followed by a space unless you 
returned the pattern in the replace field by using \1 (\1 is assuming only 
one pattern match in your search string being for the m) 

Of note. The \s also gets returns so you will get one long string if using 
the replace all option. You could try \h+ and have more luck. (\h will 
leave the returns).



On Tuesday, February 12, 2019 at 7:38:17 AM UTC-5, @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
"supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to