This would work, though:

(?:(?:^ +-+.+\r)|(?:^\s*\r))([^-]+\r){4}

Rick Gordon

-------------

Rick Gordon wrote:
I think that perhaps my solution wouldn't work if your target were in the first group before the first separator.

Rick Gordon

----------

Rick Gordon wrote:
Or really. just:

^ +-+.+\r([^-]+\r){4}

...since I'm assuming that only the separator lines could have a hyphen, and that there are no hyphens (including negative numbers), that could appear in the other lines.

Rick Gordon

-----------------

Rick Gordon wrote:
Try this:
^ +------+.+\r([^-]+\r){4}
...and change the number in the braces.

Rick Gordon

-----------------

David wrote:
I work with my airline's crew scheduling department. I want to be able
to search our trips to find which ones have day with x number of flight
legs. Here is a sample, and the formatting is always consistent:

CREW POSITIONS ARE: 1 CREW

0630 PHX 23:55 BOS 07:49 04:54 13:11 1 01 00 00 01 00 00 1
---------------------------------------- (04:54,06:09)
DH 2131 BOS 21:00 DCA 22:35 01:35 12:15 2 00 00 00 01 00 00 1
---------------------------------------- (00:00,02:35)
1801 DCA 10:50 CLT 12:14 01:24 2:06 3 01 00 00 01 00 00 1
2017 CLT 14:20 JFK 16:09 01:49 0:50 * 3 01 00 00 01 00 00 1
1798 JFK 16:59 CLT 19:12 02:13 0:53 * 3 01 00 00 01 00 00 1
1798 CLT 20:05 PHL 21:42 01:37 17:33 3 01 00 00 01 00 00 1
---------------------------------------- (07:03,11:52)
0723 PHL 15:15 BOS 16:35 01:20 2:40 4 01 00 00 01 00 00 1
0586 BOS 19:15 PHX 21:50 05:35 (071:10) 4 01 00 00 01 00 00 1
(06:55,10:35)

Each day is separated by the row of hyphens.

For example, day 3 has 4 legs.

Can someone help me craft (or just create it for me...) a GREP search
that allows me to search for days with x number of legs? I can easily
change the "x" parameter in the GREP search.

--
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.




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

Reply via email to