zotfile truncate user wildcard with regex

Ok, after much trial and error I am asking for help! I created a wildcard for book title, to rename book sections with the section title and the book title. (i don't want publication names in other file titles, which is why i created book title specifically.

all went great, but then I tried to use regex to shorten the book title in the same way zotfile truncates the titles -- so discarding everything after ./:/? - and i've gone wrong somewhere. (i used the guidance on the zotfile website.) here's what i have in the zotfile.wildcard.user advanced setting:

{"B": {"field": "bookTitle", "regex": "([\\w ,-]{1,50})[:\\.]?", "group": 1}

can anyone help me figure out what's wrong? is there a better way to write the regex out?
Sign In or Register to comment.