RE: Fw: Re: New radio PIDs, more than 8 characters

2017-08-13 Thread C E Macfarlane
See reply ...
--
www.macfh.co.uk/MacFH.html

> Would I be right in saying that amending Vangelis' suggestion to:
>  [bpw][a-z0-9]{14}
> would pick up 15 character PIDs as well as anything shorter?

Firstly it would have to be ... {8,14}, otherwise shorter ones would not be
picked up.

But there is a potential problem with [a-z0-9] because it would pick out
many normal English words, for example, ironically, 'programmes' and
'programming'.  I think you'd need the second character to be a digit, so
...
[bpw][0-9][a-z0-9]{7,13}
... would probably do the job.


___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Re: Fw: Re: New radio PIDs, more than 8 characters

2017-08-13 Thread Alan Milewczyk

On 13/08/2017 17:44, M Clark wrote:

Thanks for coding help but, the problem is worse (for me...),
PID w172vg029mkl852
Business Matters - Former US Vice President Al Gore on Climate Change 
(w172vg029mkl852)

So not even 8 characters.  Other World Service Series (?) have similar PIDs 
now, e.g. Weekend, World Update.

And I thought I was the only one who listened to WS!

M.



No you're not alone, I've been listening to the World Service (and, a 
long time ago, the European Service) for a while and thanks for pointing 
out this issue, I hadn't noticed it. I tend to do my file checking on a 
Monday for the preceding week.


I could follow the logic of  Vangelis' amended coding but I'm afraid I 
don't understand Ralph's. To be honest I'm not that bothered about 
coding that eliminates invalid PID combinations, I'm more interested in 
using something that picks them all up. Would I be right in saying that 
amending Vangelis' suggestion to:

[bpw][a-z0-9]{14}
would pick up 15 character PIDs as well as anything shorter?


Alan

PS maybe in the light of Richard's post just now, we need not worry!

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer


Fw: Re: New radio PIDs, more than 8 characters

2017-08-13 Thread M Clark
Thanks for coding help but, the problem is worse (for me...),
PID w172vg029mkl852
Business Matters - Former US Vice President Al Gore on Climate Change 
(w172vg029mkl852)

So not even 8 characters.  Other World Service Series (?) have similar PIDs 
now, e.g. Weekend, World Update.

And I thought I was the only one who listened to WS!

M.


> Sent: Sunday, August 13, 2017 at 10:05 AM
> From: "Ralph Corderoy" 
> To: get_iplayer@lists.infradead.org
> Subject: Re: New radio PIDs
>
> Hi Vangelis,
> 
> > ...to begin with either "b0" or "p0".
> > 
> >  New radio PIDs like "w3csv1y9" or "w3csvnyc", beginning with "w3",
> ...
> > [bp]0[a-z0-9]{6}
> > with
> > [bpw][a-z0-9]{7}
> 
> Other approaches, getting gradually more specific.
> 
> ^[bpw][03][a-z0-9]{6}$
> But this allows b3.
> 
> ^(b0|p0|w3)[a-z0-9]{6}$
> This is precise, but it's common to factor out alternations since
> each is tried in turn, so...
> 
> ^([bp]0|w3)[a-z0-9]{6}$
> This is as precise.
> 
> The remaining problem is the `()' "capture" what matches for retrieval
> by the program afterwards as $1, $2, ...  By introducing another set of
> `()' we'd have affected the position of any that come afterwards in the
> same regexp.  (None in this case.)  It's also inefficient to capture
> when it's unnecessary.  `()' can be marked as non-capturing with `?:'.
> 
> ^(?:[bp]0|w3)[a-z0-9]{6}$
> 
> These regexps aren't specific to Perl, BTW, but are useful with egrep,
> awk, Python, etc.
> 
> -- 
> Cheers, Ralph.
> https://plus.google.com/+RalphCorderoy
> 
> ___
> get_iplayer mailing list
> get_iplayer@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/get_iplayer
> 

___
get_iplayer mailing list
get_iplayer@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/get_iplayer