This filter doesn't work

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
gujdoa
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 24 Jul 2014, 03:44

This filter doesn't work

Postby gujdoa » 12 Oct 2016, 00:17

I had like a dozen rules in one filter for articles from The Register, "match any rule" applied, "delete article" as the action. The last one was this, applied to the title:

Code: Select all

\w+!\s+\w+!


It's supposed to match article titles like "Yahoo! halts! email! forwarding! to! outside! email! addresses!". When doing the "Test" from the "Edit Filter" dialog, it didn't pick up any articles (it should have - I had matching articles in my Fresh Articles list). Fearing that a dozen rules in one filter was too much, I moved that rule to its own filter, tried "Test" there. It picked up the articles - good. However, I'm still seeing articles get past that rule. The regex does match when I select title ~ '\w+!\s+\w+!' in PostgreSQL. Any idea what's wrong?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: This filter doesn't work

Postby fox » 12 Oct 2016, 09:51

1. there is no limit on number of rules so splitting into a different filter should not give different results unless your filter was misconfigured (i.e. match any rule not checked or something)

e: btw testing may not always provide results even for valid filters, which is i feel like i've been typing this again and again

2. the only thing tt-rss does is call preg_match() on relevant data, if preg_match() doesn't like your regexp for some reason there's not much i can do to help you. maybe it's related to that /u modifier thing posted a few days earlier, maybe not, who knows.

gujdoa
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 24 Jul 2014, 03:44

Re: This filter doesn't work

Postby gujdoa » 12 Oct 2016, 21:35

The Unicode modifier suggestion pointed me in a direction. It seems that the title in the actual feed from source has HTML italicised the exclamation marks, which doesn't make it into the ttrss_entries table verbatim. I've updated the regex accordingly, hopefully that's the last I see of them. Thank you for the tip.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: This filter doesn't work

Postby fox » 12 Oct 2016, 22:07

yeah i had an idea about them maybe escaping html entities or something but kinda forgot to post here


Return to “Support”

Who is online

Users browsing this forum: No registered users and 10 guests