#1
|
||||
|
||||
Archive extraction and blacklist patterns
I have set the entry "4SJ" solely as archive extraction blacklist pattern and downloaded a rar archive which contains a file "4SJ" without any extension. During extraction of that archive I get a file named "4SJ" from the archive created in extraction folder.
Using a blacklist pattern as for example ".*\.txt$" results in excluding all files with suffix ".txt" from extraction, so far my setting looks to be correct. Does the archive extraction blacklist patterns only apply to files with some suffixes like ".txt" or ".jpg" and not to files without any suffix? How can I achieve that the file "4SJ" is skipped during extraction? |
#2
|
|||
|
|||
Quote:
Code:
.*\\4SJ$ |
#3
|
||||
|
||||
Archive extraction and blacklist patterns
Sorry, that does not the trick - the file named "4SJ" is extracted nevertheless.
Last edited by jogol; 19.05.2021 at 08:27. |
#4
|
||||
|
||||
Quote:
Code:
regex101.com/r/yZCi1w/1 Quote:
Quote:
Quote:
|
#5
|
||||
|
||||
@jogol: Is the file in root folder or subfolder inside the Archive?
try Quote:
__________________
JD-Dev & Server-Admin |
#6
|
||||
|
||||
Quote:
Quote:
On Raspberry Pi, which is Linux, the mentioned pattern does not trigger file skipping because of different path separator as compared to Windows. When I use Code:
.*\/4SJ$ So platform makes a difference as far as I can see. One single pattern matching both on Raspberry Pi AND Windows at the same time would be for example the following: Code:
.*[\/\\]4SJ$ Quote:
So my conclusion for matching all said details so far would be to use a pattern like: Code:
(^|.*[\/\\])4SJ$ Many thanks to all suggestions and I think my problem is solved now in a more general way than I thought of in the beginning. |
#7
|
||||
|
||||
You don't have to escape the /, pattern should work with
Quote:
__________________
JD-Dev & Server-Admin |
#8
|
||||
|
||||
Thanks for the feedback! Great to hear that you got it working
__________________
JD-Dev & Server-Admin |
#9
|
||||
|
||||
Quote:
Thanks! |
#10
|
||||
|
||||
You're welcome
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|