I understand the concept and am playing with my own bespoke versions:
- ^\\(?!Library$) exclude all except the folder \Library (I organise my books for clarity into a top level directory called Library. For me this is the simplest if not the most general solution.)
- ^\\(\..+|fonts|icons)$ exclude any top level directory starting with a . or called fonts or icons
I do know about (\\.(?!kobo|adobe).*?|([^.][^/]*/)+\\..+) but from what I can see it is interestingly complicated and inadequate assuming you want to exclude fonts and icons (sorry if I am treading on toes here - I just want to understand and I am a newbie of a few days).
I could spend a lot of time experimenting but my questions may be able to be answered quickly here.
- Is the OS character for a new subdirectory level \ or /?
- If the text after the = is not preceded by \ or even .\ does the OS assume the top level? I.e. are Library, \Library, .\Library treated as the top level directory called Library?
- Is the exclusion a full path exclusion or are subdirectories automatically excluded? I.e. does excluding \MyFolder exclude files in MyFolder and recursively files in its subdirectories?
- What is special about the characters . and / that the "standard" exclusion regex part ([^.][^/]*/)+\\..+) seems to care about? (I know typically . means the current directory and as for / see above questions.)
Thanks in advance for reading this far.