On 12/10/18 at 9:22 AM, [email protected] ('Holger Bartel'
via BBEdit Talk) wrote:
Absolutely untested, but maybe something like counting number
of line ends followed by a line break/return as in search for:
$\r{number_of_lines} or $\n{number_of_lines} could work? Grep
needs to be turned on for that, in case that’s new.
I think $\n{min, max} should find those that have less or more
lines if I’m not mistaken.
and on Tue, 11 Dec 2018 03:00:28 -0800 (PST),
[email protected] (Philippe Carly) wrote:
Unfortunately BBEdit doesn't seem to understand the {x,y} bit
of the GREP search....
For reference, BBEdit does indeed support the { }-style
quantifiers as described in the "Quantifiers Repeat Subpatterns"
in Chapter 8 of the PDF manual (see page 179 in the latest edition).
I regret however that the suggested search pattern of "$\n{min,
max}" will not do what you're after[*], nor is there any direct
way to limit a multi-file search to files containing some given
number of lines.
In order to accomplish that, you'll need to pre-filter the files
and pass only those of the desired size to BBEdit for searching,
e.g. in a manner similar to Sam Hathaway's post.
[*: This pattern will instead just match the next run of between
'min' and 'max' line feeds (i.e. consecutive empty lines)
following a line break.]
Regards,
Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com/>
--
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.