Splitting variables in CSL?
Is it currently possible to split a variable string into substrings using CSL?
I got to this while trying to figure out a way to automatically append the PMCID onto my bibliography entries. Certainly I can use the "Extras" field for this purpose, but what happens if I want PMID and PMCID, or if there is another "extra" I need? One option would be to split the "note" variable into the proper segments based on delimiters. I couldn't find a way to do it. For example, suppose Extras had "PMID: 1111111; PMCID: 2222222;". If I could split the entire thing by "PMCID: " and ";", then I would have my PMCID leftover. Same for other types of IDs. Perhaps this would also help with the four-letter citation (AbCd10) and subtitles in recent discussions. Another approach might be to have additional "extra" or "user" fields for customized input/output like this. Having only one "extra" is limiting.
I got to this while trying to figure out a way to automatically append the PMCID onto my bibliography entries. Certainly I can use the "Extras" field for this purpose, but what happens if I want PMID and PMCID, or if there is another "extra" I need? One option would be to split the "note" variable into the proper segments based on delimiters. I couldn't find a way to do it. For example, suppose Extras had "PMID: 1111111; PMCID: 2222222;". If I could split the entire thing by "PMCID: " and ";", then I would have my PMCID leftover. Same for other types of IDs. Perhaps this would also help with the four-letter citation (AbCd10) and subtitles in recent discussions. Another approach might be to have additional "extra" or "user" fields for customized input/output like this. Having only one "extra" is limiting.
Splitting fields sounds like a nightmare to deal with from a programming point of view.
I'm not sure how I feel about more custom fields, but the main reason they don't exist is that user specific custom fields suck for sharing data between users - one of Zotero's principal purposes.
That'd be much more in the spirit of data exchange that custom fields which sound too much like a workaround to me, which would then stand in the way of better long term solutions.