On 20 Jan 2021, at 6:45, Martin Post wrote:
I need to build an (editable / exportable) list of terms from a
Multi-File
Search including the names of the files where the searched string /
pattern
is found. So my question is:
Is there a Replacement Pattern / token for the file name in a
multi-file
search, so clicking “Extract” in the Multi-File Search dialog
would give me:
fil1.txt: foo.txt
file3.txt: fOO.txt
etc.
Not sure the Multi-File search has a way to capture file names - but I
wouldn’t be surprised if someone points out how it can.
How’s your script-fu?
This could be done readily with a script (Perl, AppleScript, etc) or a
BBEdit text factory.
But clarify: your sample output looks like nothing but file names. Which
are the terms you mention searching for? I’m guessing the first item
before the colon is the file name.
Also:
1. Would there be only ONE term found per file?
2. ONE term pattern searched for at a time across all the files?
3. Will the files you’re searching all be in the same
directory/folder? That would affect how to write a script, and how
portable the operation is without tweaking each time.
Great question, and I’m sure folks on this list will have ideas.
HTH,
- Bruce
--
This is the BBEdit Talk public discussion group. If you have a feature request or need
technical support, please email "[email protected]" rather than posting here.
Follow @bbedit on Twitter: <https://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 view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/747D30E0-400D-4438-8C31-FDDC54D7072D%40cruzio.com.