Project

General

Profile

Autorec - regex

Added by Andrew Duane over 11 years ago

Hi,
I have been using the Autorec feature and am wondering how the pattern matching has been implemented. I have setup a rule to record MasterChef Australia but this also records "MasterChef Australia Encore" using the default rules which is not desirable.

I noticied that the title in the recording section mentions regex so I changed it to: \WMasterChef\sAustralia\W but now its not matching anything. I checked my syntax with a regex tester and think its right; any ideas?

And thanks to the TVHeadend team for developing a great application.


Replies (2)

RE: Autorec - regex - Added by Adam Sutton over 11 years ago

How about simply "MasterChef\s+Australia$"? you could add \W* before the $ just incase there is some crap after the title. Your expression says:

There must be 1 non-word char before MasterChef, followed by 1 space, followed by Australia, followed by 1 non-word char. So its failing because of the first \W and when you remove that it will then include the thing you're trying to exclude because it places no limit on what may come next.

Adam

RE: Autorec - regex - Added by Andrew Duane over 11 years ago

Thank you Adam, I appreciate your support. That did the trick.

    (1-2/2)