\s+ matches one or more whitespace characters; as such, blank lines proper (i.e. without trailing whitespace) won't be matched by ^\s+$.
Try ^\s*$ (lines containing 0 or more whitespace characters). On Sun, Jan 8, 2017 at 4:57 PM, Mike Pullen <[email protected]> wrote: > 1. This regular expression works in BBEdit to find all blank lines and all > lines containing only whitespace: ^\n|^\s+\n > > > 2. However, this regular expression does not find all of those same lines: > ^\s+$ > > > I've attached the file (test.txt) that I am using to test both regex's. > > > I would like to understand why the second regex doesn't work. > > > Help, please. > > > Thanks. > > > > > > -- > This is the BBEdit Talk public discussion group. If you have a > feature request or would like to report a problem, please email > "[email protected]" rather than posting to the group. > Follow @bbedit on Twitter: <http://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 would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://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.
