0
Answered

"Scan exclusion pattern" - can you have more than one?

TexasDave 7 years ago updated 7 years ago 5

Can you have more than one "pattern" for the "Scan exclusion pattern" option?


If so, what is the separator? comma? semicolon?


Thanks!

Answered

Yes.

Pattern are described using regular expressions. You'll have to use a logical OR (described by a pipe: "|").

Here is a detailed tutorial to understand regexps:

https://regexone.com/


And here is a tool to easily test your expressions:

http://java-regex-tester.appspot.com/


Keep in mind that the expression you write will be matched against the entire path of the file, not only the filename.


Cool - thanks for the tip!



So I have two folders I want to skip: LazyLibrarian and Calibre-Upload


I added the following: LazyLibrarian|Calibre-Upload


I checked it on the tool and it seems right but is not working in Ubooquity. Any ideas?


Thanks!

The expression has to match the whole file path.

By whole file path I mean that Ubooquity tests each file with a path like that:

/myData/myBooks/Calibre-Upload/myBook.epub

So the expression has match what's around your folder name.
This one should work:

.*(LazyLibrarian|Calibre-Upload).*

I'll probably try to simplify this mechanism in the future (e.g. so that a simple "LazyLibrarian|Calibre-Upload" pattern works, without having to match the whole path).

Works like a champ - thanks for your help!