hpr1291 :: Parsing an ISO8601 formatted duration field with Perl
A step-by-step explanation of writing a regular expression in Perl to parse an ISO8601 time duration
Hosted by Dave Morriss on Monday, 2013-07-15 is flagged as Explicit and is released under a CC-BY-SA license.
Perl, regular expression, ISO8601 time duration.
(Be the first).
The show is available on the Internet Archive at: https://archive.org/details/hpr1291
Listen in ogg,
spx,
or mp3 format. Play now:
Duration: 01:20:32
general.
Ken recently asked Dave for help with a Perl regular expression for parsing ISO8601 time durations. As a consequence a Perl script was written, which is available at https://gitlab.com/davmo/hprmisc/blob/master/parse_8601_duration.
In this show Ken and Dave discuss this script at some (considerable) length. Keen listeners might want to view the script as they listen. Detailed show notes describing how to put together a Perl regular expression are also available.
Unfortunately some of the line numbers in the script referred to in the show are now incorrect since Dave could not stop himself updating it.
For detailed show notes on how Dave created the script see:
- Detailed notes
- For a html version of the script see:parse_8601_duration.html
- Computer Books v Math: https://abstrusegoose.com/strips/i_never_would_have_passed_kindergarten.png
- XKCD ISO8601: https://sslimgs.xkcd.com/comics/iso_8601.png
- Sams Teach Yourself Perl in 24 Hours (3rd Edition): https://www.amazon.com/dp/0672327937