Page 1 of 1

Parse a Filename into Parts

PostPosted: Sun Jun 29, 2025 8:49 am
by daylight54
I have a bunch of files with the name in a format such as:
How to_draw a Tiger - and many more -- Dr Doolittle -- a bunch of other things -- even more.epub

I want to parse out up until the second -- so that I end up with
How to_draw a Tiger - and many more -- Dr Doolittle.epub

The problem is I can't figure out how to pattern match. I cant use custom text like (sorry I kept getting a broken link picture when I tried to load the image but here is the link
https://drive.google.com/file/d/1Quf92pGONioZ4aMevrFAV17UfuQ2WFT9/view?usp=sharing
because the titles have special characters. I assume there is some way to do this with a script but I have no idea how to create such a script and I've searched and can't find something close that I could adapt. Thanks in advance for the help!

Re: Parse a Filename into Parts

PostPosted: Mon Jun 30, 2025 9:10 am
by Mr_Noodle
Note that the characters token does not match spaces. You can probably use "anything" there. Also, it might be better to put the -- outside the custom attribute, like you did for the one after part 2.