Regular expression in RSS downloader not working properly

Bug #501420 reported by Christophe Dumez
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qBittorrent
Fix Released
Medium
Christophe Dumez

Bug Description

I'm tryin to setup some download filters for automatic downloading. Sometimes it's impossible to setup a name which will match current name of the torrent. Will be verry handy to have some universal signs like ? and *. ? could replace one specific character in the string (ex. ubuntu?9 - ? is replacing space " "or dot ".") while * could be responsible for a specific string (ex. ubu*u - * is replacing "nt" in that case).
I hope that U know what i mean.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

If it does not work then it is a bug, I will make some testing and fix this tonight or tomorrow.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

I used:
ubuntu*9* in matching

Typed "ubuntu.9.10" in the test field and hit the "Test" button. It says "Matches" here. This is odd because it is exactly the same example as you gave.

What version of Qt are you using? Could you make some more tests and determine what works and what does not?

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Ok. I committed a fix to SVN. Now qBittorrent uses wildcard matching instead of full regex.

Wild card supports:
- *
- ?
- [abcd]

It should do exactly as you expect. With Full regex, you should input something like:
"ubuntu.?9" to match "ubuntu.9.10" (instead of simply "ubuntu?9" with wildcard)

The "." in a regex means "Any character".

The fix will be in v2.0.4 (that I should release in the next few days)

Changed in qbittorrent:
assignee: nobody → Christophe Dumez (hydr0g3n)
importance: Undecided → Medium
milestone: none → 2.0.4
status: New → Fix Committed
Revision history for this message
bear7 (bear7) wrote :

[quote]What version of Qt are you using?[/quote]
qt4
[quote]Could you make some more tests and determine what works and what does not?[/quote]
I did more tests:
Torrent name that I used: ubuntu.9.10.karmic-amd64.deb
(Match option -- result)[quote]What version of Qt are you using?[/quote]
qt4
[quote]Could you make some more tests and determine what works and what does not?[/quote]
I did more tests:
Torrent name that I used: ubuntu.9.10.karmic-amd64.deb
(Match option -- result)
u* -- match
ub* -- match
ub*t* -- match
ub*t*9* -- match
ub*t*9.* -- dsn't match
ub*t*9*1* -- match
ub*t*9*10* -- dsn't match
ubuntu*9.10* -- dsn't match
ubuntu*9*10* -- dsn't match
ubuntu*9*1* -- match
ubuntu*amd64* -- dsn't match
ubuntu*amd* -- dsn't match
ubuntu*a* -- match
ubuntu*64* -- dsn't match

u* -- match
ub* -- match
ub*t* -- match
ub*t*9* -- match
ub*t*9.* -- dsn't match
ub*t*9*1* -- match
ub*t*9*10* -- dsn't match
ubuntu*9.10* -- dsn't match
ubuntu*9*10* -- dsn't match
ubuntu*9*1* -- match
ubuntu*amd64* -- dsn't match
ubuntu*amd* -- dsn't match
ubuntu*a* -- match
ubuntu*64* -- dsn't match

description: updated
Revision history for this message
bear7 (bear7) wrote :

sorry for a post above :) once again:

[quote]What version of Qt are you using?[/quote]
qt4
[quote]Could you make some more tests and determine what works and what does not?[/quote]
I did more tests:
Torrent name that I used: ubuntu.9.10.karmic-amd64.deb
(Match option -- result)
u* -- match
ub* -- match
ub*t* -- match
ub*t*9* -- match
ub*t*9.* -- dsn't match
ub*t*9*1* -- match
ub*t*9*10* -- dsn't match
ubuntu*9.10* -- dsn't match
ubuntu*9*10* -- dsn't match
ubuntu*9*1* -- match
ubuntu*amd64* -- dsn't match
ubuntu*amd* -- dsn't match
ubuntu*a* -- match
ubuntu*64* -- dsn't match

Changed in qbittorrent:
status: Fix Committed → Fix Released
Revision history for this message
medius (bugs-noremac) wrote :

I'm seeing incorrect or rather incomplete regular expression behaviour in qBittorrent 2.1.5.
I'm trying to write a rule that will match a feed for "Lost" but not "The Lost Empire" normally I would just write a regular expression that started with a ^ to indicate that the expression must be at the start of the line. i.e. something like ^Lost would match "Lost" but not "The Lost Empire" I think that this used to work, but it doesn't seem to be working in this version.

Revision history for this message
Christophe Dumez (hydr0g3n) wrote :

Hmm. Yes, I'm aware. I'll try to have a look at regex support again when I get some spare time.

In the meantime, I suggest you specify the season number in the regex. For example
"Lost S06" will match anything with "LOST" AND "S06" inside.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.