Possibility to initialize multiple given names in renaming pattern?

For creators that have multiple given names (stored in Zotero as first name middle name or first name middle initial) Is there a way to use the initials of all given names in renaming conventions?
So that I would get:
Smith, Jack => Smith, J
Smith, John Paul => Smith, JP

What I have, so far is:
{{ creators name="family-given" initialize="given" initialize-with="" }}

But initialize="given" only initializes the first given name. Is there some option that would initialize all given names?
  • Been also trying with a regex for the first creator, but clearly doing something wrong (it's simply printing the regex):

    {{ creators max="1" name="family" }}, {{ creators max="1" name="given" replaceFrom="(?<=\w)(\w*)" replaceTo="" regexOpts="g" }}
  • If there's anyone who could help me understand how to use regexes in renaming patterns, I'd greatly appreciate it.
    I've played around some more and the more I read and experiment the more confused I get it seems. So it looks like this pattern is recognized [a-zA-Z0-9_], but not \w which should be exactly the same. Is there any explanation for this?

    I did manage to at least make some regex work using this:

    {{ creators max="1" name="given" replaceFrom="((?:[a-zA-Z0-9_])?).*" replaceTo="$1" regexOpts="g" }}


    which returns the first initial of the given names. But I'm still not where I want to be at, hoping to get at all the initials of second (and third) given ("middle") names.

Sign In or Register to comment.