Hi, attempting to create a REGEX to extract only PDFs
For my test I have a RAR with these files:
Quote:
Mathematical Foundations of Computer Science.epub
|
Quote:
Mathematical Foundations of Computer Science.pdf
|
Here are my attempts and results:
.*\.(?!pdf) - matched both
.*[.](?!pdf) - matched both
.*(?!pdf)$ - matched none
^.*(?!pdf)$ - matched none
I read a message from 2019 that says that JD uses Java patterns, shouldn't it work?
forget the line anchors, why does the negative lookahead match both epub and pdf?
Tested with regex101.com (Java 8 flavor), works over there, but not in JD. help me fams..
Edit:
Also, this REGEX works but come on...that's really ugly, would rather use negative lookaheads..
.*\.[^p][^d][^f].?