Page 1 of 1
Using regex expressions to select attachments
Posted: Sun Jan 29, 2017 10:33 am
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
Re: Using regex expressions to select attachments
Posted: Sun Jan 29, 2017 10:49 am
by Jon
No, Regex is for searching only. Have you tried Refs -> Get PDF -> Find and Attach Local PDF?
Jon
Sonny Software
Re: Using regex expressions to select attachments
Posted: Sun Jan 29, 2017 12:11 pm
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.
Re: Using regex expressions to select attachments
Posted: Sun Jan 29, 2017 12:27 pm
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
Re: Using regex expressions to select attachments
Posted: Sun Jan 29, 2017 1:22 pm
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.
Re: Using regex expressions to select attachments
Posted: Wed Feb 01, 2017 6:21 pm
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.
Re: Using regex expressions to select attachments
Posted: Thu Feb 22, 2018 9:33 pm
by Dellu
Thank you for adding the targeted (guided) search feature.
Finding and attaching a pdf is much more efficient now.