On Jan 18, 2011, at 15:02, Ronald J Kimball wrote:
> Here's the approach I usually take for this kind of task:
> 
> ^(?>(?:(?!\.app).)*)\.app$
______________________________________________________________________

Hey Ronald,

I bow before the master.  :)

For Rick:

After looking at golem's approach I realized I'd could have provided better 
information:

I want to find the first instance of DEVONthink Pro.app but NOT .apps that it 
contains as in the 2nd line:

/Applications/Applications (Chris)/Data Storage Apps/DEVONthink Pro 
Office/DEVONthink Pro.app

/Applications/Applications (Chris)/Data Storage Apps/DEVONthink Pro 
Office/DEVONthink 
Pro.app/Contents/PlugIns/ExactScanPlugin.bundle/Contents/MacOS/ExactScan 
Capture.app

Fortunately Ronald understood what I was getting at and provided a solution 
that works nicely.

> But I also thought of a simpler approach in this case:
> 
> ^(?!.*\.app.*\.app).*\.app$

Aha!  I was trying to do this earlier, but I couldn't quite get the syntax 
right.

Thanks again Ronald.

I'm just getting into these assertions, and they're still making my head hurt.  
:)

Is there a good tutorial on how they work somewhere?  The BBEdit manual is a 
little light on examples.  (I do have "Mastering Regular Expressions", but it's 
not always an easy read. :)

--
Best Regards,
Chris

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

Reply via email to