On Mon, Apr 16, 2012 at 10:54:55AM -0700, David wrote: > I need some Grep help. > > I need to remove this type of entry from a large file. > > "No Fly List: > 101508 > 100698 > > Other options" > > > ignore the quotation marks, I added them to illustrate the start and > end of the string. > > Each six digit employee number begins with 1. Each line ends with a > carriage return. > > The problem for a newbie like me is that there may be one or twenty > employee numbers, each on its own line, and I'm not sure how to handle > that. There is no hard limit on the number of 1xxxxx numbers to search > for between No Fly List:\r and Other Options"
One line containing an employee number: [ \t]*1\d{5}\r One or more lines containing an employee number: ([ \t]*1\d{5}\r)+ :) So, the complete pattern might look like this: (?m)No Fly List:\r(\s*1\d{5}\r)+\rOther options Ronald -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>