BBEdit multifile search criteria to not search through backups

I love the multi-file search in bbedit. It’s extremely useful. The only problem is that it wants to search through every single file for a pattern match if you don’t tell it otherwise. Here’s a way to have it only search through your current files and not your backups.

set two criteria for the search:

1. File Ends with: “.php” (or whatever)

2. File does not match grep pattern:

 ^.*\([0123456789]+-[0123456789]+-[0123456789]+[]\)?-?[0123456789]+

Anything at the front of the file name, (^.*),
then a backslashed open parens ,( \( ),
then any number or numbers, ([0-9]+),
a literal dash, ( – ),
another number or numbers ( [0-9]+ ),
a literal dash, ( – ),
a backslashed close parens, ( \) ),
maybe another dash, or not, ( ?- ),
maybe another number or numbers, ( [0-9]+ )

Let me know if that helped, or if I messed up the syntax. I used txt2regex to get me started here… that’s a super useful tool. Thanks Tony N.!

Share this:
Share this page via Email Share this page via Stumble Upon Share this page via Digg this Share this page via Facebook Share this page via Twitter
Bookmark and Share