[mythtv-users] Schedule by regexp

Bruce Markey bjm at lvcm.com
Wed Nov 9 14:26:11 EST 2005


Alex Polite wrote:
> Hi.
> 
> I wan't to match programs to record by a regexp. How do I do that?

I'll start from the premise that you just want to do a simple
wildcard match. If so, go to Schedule Recordings->Search Words->
Titles. Select "<New Phrase>" and enter your keyword and press
Enter. If the results show the things you want to record, press
"M"enu, Tab or "M"enu again to focus on the buttons and click
"Record". This will show the recording options page for a search
rule to match the keyword in the title.

If you wanted to match any show about or including Lance Armstrong,
go to Search Words->Keywords and enter "Lance Armstrong". This will
match any show that mentions Lance in the title, subtitle or the
description.

Custom Record (http://www.mythtv.org/docs/mythtv-HOWTO-12.html#ss12.5)
would allow more elaborate matching and additional criteria for your
search rule. If you meant "regexp" [sic], mysql has a regexp function.
See the "Multiple sports teams" example:

program.title = 'NBA Basketball'
AND program.subtitle REGEXP '(Miami|Cavaliers|Lakers)'

This would match any game involving Shaq, LeBron, or Kobe. This
example is a simple "OR" but you could use any valid regexp matching
any of the valid database fields.

--  bjm


More information about the mythtv-users mailing list