These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

Search Strings

user-1107

Just wondered if there's a wildcard I could add to a PVR entry so that e.g. I could record every new series of I'm Sorry I haven't a Clue rather than add each series manually. I've tried this:

fields name
modes default
subtitles 0
thumb 0
type radio
versionlist default
search0 ^I'm Sorry I Haven't A Clue$

But it doesn't seem to work. Any help appreciated

user-2

Here's a hint: Look at the full name of the series you're trying to match, then consider the function of the dollar sign metacharacter in your search string.

user-1107

Where do I find the function of the dollar metacharacter? I don't think I've seen anything in the wikis that advises.

Full series is:

fields name
modes default
subtitles 0
thumb 0
type radio
versionlist default
search0 ^I'm Sorry I Haven't A Clue: Series 64$

user-2

Search strings are interpreted as regular expressions. This is mentioned in the examples page in the wiki, where there is a link to a site that will tell you more than you ever wanted to know on the subject. Since you used one for your pvr job I assumed you knew what they are. Since that seems not to be the case, Google is your friend. There is no shortage of information on regular expressions out there. The particular subject of interest is anchors, of which the dollar sign is one.

user-2

It's also worth pointing out that the simplest form of a regular expression match is a substring match, without the use of any special characters. Given that you have a very specific series name that is unlikely to be part of any other programme name, that should suggest a very simple solution to you.

user-1107

Just found it, so dollar sign is my issue! Not sure I'd checked the github page previously. That was easy :)

I use EditPad (lworks with RegEx) as my text editor, I've tried and failed to get to grips with regular expressions in the past. It can't be that hard, should try again. Thanks

user-2

Correct.  In your case, it's probably enough to just search for I'm Sorry I Haven't A Clue, but you can also anchor the match to the beginning of the series name with the caret: (^I'm Sorry I Haven't A Clue) so that any series number suffix will essentially be ignored.

user-1107

Noted, didn't know that was an anchor either

user-2

You will rarely, if ever, need to use real regular expressions with get_iplayer. The web pvr uses them to exactly match full series names, but substring matches will almost always be enough for your own pvr searches since most series names are fairly unique.

user-1107

The last time I tried to use regular expressions was when I had to search through some data files from a long defunct piece of software at work. I should have tried harder but IT is not my day job, it's just an addon. Thanks for your input and supporting this fab product.

These forums are archived

See this post for further info