Using regex expressions to select attachments

A place for users to ask each other questions, make suggestions, and discuss Bookends.
Post Reply
Nhaps
Posts: 252
Joined: Mon Sep 26, 2011 10:05 pm

Using regex expressions to select attachments

Post by Nhaps »

I have many references that are still not matched to attachments, and I'm looking for a way to find possible matches quickly. Is there any way to match a reference title to attachment names in given folder through Regex? Most of my attachments filenames contain the title of references, that's why I'm asking
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Using regex expressions to select attachments

Post by Jon »

No, Regex is for searching only. Have you tried Refs -> Get PDF -> Find and Attach Local PDF?

Jon
Sonny Software
Nhaps
Posts: 252
Joined: Mon Sep 26, 2011 10:05 pm

Re: Using regex expressions to select attachments

Post by Nhaps »

Ok. Yes, I have tried that but it yields many options but no match. I have always wondered why "Refs -> Get PDF -> Find and Attach Local PDF" does not work well here.
Jon
Site Admin
Posts: 10291
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Using regex expressions to select attachments

Post by Jon »

It's a function of matching machine-generated Spotlight search words designed to find a single hit and the actual index entries created by Spotlight (remembering that Spotlight indexes the content of the PDFs, not the names of the files). Sometimes it works and sometimes it doesn't.

Jon
Sonny Software
Nhaps
Posts: 252
Joined: Mon Sep 26, 2011 10:05 pm

Re: Using regex expressions to select attachments

Post by Nhaps »

That's the reason why it's spitting dozens of hits unrelated to the one we want. I would think it's more useful to match just the name of the file. Spotlight can aim for either one, so I think it would be possible to adapt your inbuilt script. Maybe we could expect this implementation in the future? The ideal would be to choose between two options, one by content, or by title search.
Dellu
Posts: 271
Joined: Sun Mar 27, 2016 5:30 am

Re: Using regex expressions to select attachments

Post by Dellu »

I condone Nhaps' suggestion.

One big book in the disk deludes Spotlight. I have a 4000 page monster. It always come on top. It would be more practical if the "Find and Attach Local PDF" would target just the file name.
Dellu
Posts: 271
Joined: Sun Mar 27, 2016 5:30 am

Re: Using regex expressions to select attachments

Post by Dellu »

Thank you for adding the targeted (guided) search feature.
Finding and attaching a pdf is much more efficient now.
Post Reply