[solved] filter regular expression does not work as intended

Questions about Cobian Reflector
Post Reply
mister00
Posts: 6
Joined: 05 Dec 2021, 17:26

[solved] filter regular expression does not work as intended

Post by mister00 »

Hello, it’s so nice to see Cobian again alive - I must have used it under Win XP. Thanks for your work.

My problem :
* Win 10 64 bits
* I tried to filter files with a regular expression [0-9]{2,4}x[0-9]{2,4}\.jpg$
I use WordPress and WordPress generates a lot of thumbnails for a image.jpg
All the thumbnails are named like image-1200x993.jpg and I don’t want these thumbnails to be saved. But Reflector did not filter them correctly. The regular expression had been tested on another backup software and it worked.
2021-12-05_17h29_45.png
2021-12-05_17h29_45.png (56.68 KiB) Viewed 2387 times
Last edited by mister00 on 09 Dec 2021, 12:05, edited 1 time in total.
User avatar
cobian
Site Admin
Posts: 4492
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: filtre regular expression does not work as intended

Post by cobian »

This is a little overcomplicating the task. I would use a mask
image-*.jpg

But yes, I will review this expression
--
Luis Cobian
Cobian Backup's creator
mister00
Posts: 6
Joined: 05 Dec 2021, 17:26

Re: filtre regular expression does not work as intended

Post by mister00 »

Sorry I may be not clear enough : I need to backup image.jpg but not image-1200x993.jpg
gvd
Posts: 127
Joined: 05 Oct 2021, 16:05
Location: Belgium

Re: filtre regular expression does not work as intended

Post by gvd »

Hello Mister00,

May I suggest you try with ^image-[0-9]{2,4}x[0-9]{2,4}\.jpg$ to test whether there is a problem with the interpretation of the regular expression ?
Gabriel
User avatar
cobian
Site Admin
Posts: 4492
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: filtre regular expression does not work as intended

Post by cobian »

Yes, I also think that the original expression is not to exact
--
Luis Cobian
Cobian Backup's creator
User avatar
cobian
Site Admin
Posts: 4492
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: filtre regular expression does not work as intended

Post by cobian »

The expression image-[0-9]{2,4}x[0-9]{2,4}\.jpg$ does work. .*-[0-9]{2,4}x[0-9]{2,4}\.jpg$ does it as well.
--
Luis Cobian
Cobian Backup's creator
mister00
Posts: 6
Joined: 05 Dec 2021, 17:26

Re: filtre regular expression does not work as intended

Post by mister00 »

cobian wrote: 09 Dec 2021, 01:39 The expression image-[0-9]{2,4}x[0-9]{2,4}\.jpg$ does work. .*-[0-9]{2,4}x[0-9]{2,4}\.jpg$ does it as well.
Thanks a lot. I’m not good at all in regular expression, and it seemed to work on testing sites. It’s good now. Sorry for late answer, I don’t receive notification emails :-(
Post Reply