You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to rename files according to the following scheme:
"original data"
"more data"
>
rename
first middle surname of authors
title
>
surname_f(m)_title
Author McAuthentic
How to waste time with regex
>
mcauthentic_a_how_to_waste... (depends on cutoff)
Adam Adams; Bob Bobsen
Our-Very-Important Book
>
adams_a_bobsen_b_our_very_important_book
...
...
...
the middle names are optional and I already gave up on
I tried to get information from the website, but the description on how users can define wildcards did not cover all necessary information. Googling and a code search was unsuccessful. ChatGPT helped a little but did not get the problem. My regex should do the job according to regex101.com -- compare below -- but I am too inexperienced to rule out a simple error on my behalf. Anyways, Zotero / ZotFile does not accept it and just gives me the full authorLastG that I used, or doesn't capture all necessary info.
Ideal fix: Please provide other means to make such formats easily achievable.
My test-case for the regex capturing:
I am aware that the test-case does not suffice but should still represent a relevant MWE. If it works a sequence of regex's, append's and finally replace and toLower would be enough (hence it must work in sequence). In the end the information from authorLastG (eg. _surname,_firstname_surname2,_firstname2_m.) should be extracted and the format would look something like this: {%1_}{%t}
I wanted to rename files according to the following scheme:
I tried to get information from the website, but the description on how users can define wildcards did not cover all necessary information. Googling and a code search was unsuccessful. ChatGPT helped a little but did not get the problem. My regex should do the job according to regex101.com -- compare below -- but I am too inexperienced to rule out a simple error on my behalf. Anyways, Zotero / ZotFile does not accept it and just gives me the full
authorLastG
that I used, or doesn't capture all necessary info.Zotero-Version: 6.0.33 (homebrew)
ZotFile-Version: 5.1.2
OS: macOS
Ideal fix: Please provide other means to make such formats easily achievable.
My test-case for the regex capturing:
I am aware that the test-case does not suffice but should still represent a relevant MWE. If it works a sequence of regex's, append's and finally replace and toLower would be enough (hence it must work in sequence). In the end the information from
authorLastG
(eg._surname,_firstname_surname2,_firstname2_m.
) should be extracted and the format would look something like this:{%1_}{%t}
My regex:
ChatGPTs try:
Test:
Some
authorLastG
test-cases for regex101:The text was updated successfully, but these errors were encountered: