Autolink files with key only at the beginning of the file

There is an option in Preferences->External programs to “Autolink files with names starting with the BibTeX key”. I want to have that option activated, but instead of the “BibTeX key”, with the “key”. I therefor want to use the Regular Expression Search but honestly, I’m not sure how to exactly adjust the field.
**/.*[key].*\\.[extension]
searches for the key in the whole file-name. How do I have to change the expression that it only looks at the beginning of the file?

Thanks in advance for your help!

Hi!

I do not really understand what you mean with “the ‘key’” - by default JabRef is only working “bibtexkeys”… Do you have a customized field named “key”?

However, adapting the expression to **/[key].*\\.[extension] (i.e., removing .* before the [key]) should work… :wink:

Regards
Matthias

Hi Matthias,

you’re right, I totally forgot that “key” is not an official field but a custom one that I set up. Anyway, your solution works, thanks a lot for your help!

Best wishes,
Wolfson