New radio PIDs, more than 8 characters - "solved"

C E Macfarlane c.e.macfarlane at macfh.co.uk
Tue Aug 15 08:02:50 PDT 2017


More on REs ...
--
www.macfh.co.uk/MacFH.html

>     > Yes, I was aware of \b support in some languages, but RE support
>     > varies across languages, and, knowing this but not being experienced
>     > in PERL, I checked at least two online sources for PERL REs
>     and could
>     > find no evidence of support for it.
>
>     One is http://perldoc.perl.org/perlre.html#Assertions

Obviously my brief research was too brief!

So, yielding to your superior knowledge of PERL, for the sake of clarity for
the benefit of those who may have had difficulty in following the nuances of
the argument, or been confused by the multiple suggestions, would we both
agree with?:
	\b[bpw][0-9][a-z0-9]{7,13}\b

>     It was Perl that invented `\b', along with many of the other
>     conventions
>     that spread to other implementations, e.g. `\d' for digit, a
>     `?' suffix
>     for non-greedy as in /<.*?>/, the otherwise invalid `?' after an open
>     parenthesis as a gateway for further flags like the
>     non-capturing `:' in
>     /(.)(?:.)(.)/, etc.  Larry Wall was very knowledgable of the Unix
>     programming environment, including the various regular expression
>     syntaxes in sed, grep, egrep, ..., and came up with a consistent
>     almost-superset that had some nice conveniences too.

As it happens I've been doing some Bash scripting over the last week or so.

>     > True, but if that is starting to happen, then one of the
>     other 'rules'
>     > was to break a monolithic program into blocks
>
>     Alas, AFAIK, get_iplayer wishes to ship as a single file.

You can still break a single file down into blocks, both by using
subroutines/functions or even just by appropriate layout and commenting, and
in both cases individually testing that the resulting sections do what is
expected of them.




More information about the get_iplayer mailing list