On Wed, Nov 30, 2011 at 11:24:46AM -0700, Doug McNutt wrote:
> At 12:57 -0500 11/30/11, Ronald J Kimball wrote:
> >(?mx)
> >(^THIS\ IS\ TRIP\ NUMBER.*\n                   # initial header
> > (?:\S.*\n)*                                   # any additional headers
> > \n                                            # blank line
> > (?:
> >  (?:[ \t]*\d.*\n)+                            # one or more flights
> >  [ \t]*-----+.*\n                             # day separator
> > )*
> > (?:[ \t]*\d.*\n){3}                           # exactly three flights
> > [ \t]*\(.*\n                                  # total time
> > THE\ CALCULATED\ CREW\ COST.*\n               # final line
> >)
> >

> Ronald surely means that you should concatenate the first parts of each
> line into the search string which is using grep.  Remove \s*?#.*\r from
> the message as opened in BBEdit.

Actually, (?x) enables "extended regular expression syntax", which causes
most whitespace to be ignored (that's why the spaces are escaped), and
allows comments beginning with #.  As I said, the regular expression should
work in BBEdit as is.  Removing the comments and indentation should not be
necessary.

> But on a file opened by BBEdit you'll want to use \r instead of \n to
> match the line ends.  That's because BBEdit will be using 16 bit
> characters after converting whatever line ends were on the original to
> 0D, the old Macintosh way.

...except for that.  I expect you're correct that it should be \r, not \n,
in the BBEdit Find window.

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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to