xkcd: Everybody stand back. I know regular expressions.

paths
Doug Coleman 2018-06-16 19:26:47 -05:00
parent 317ceee23c
commit c477757fa0
1 changed files with 2 additions and 2 deletions

View File

@ -13,8 +13,8 @@ IN: xkcd
: comic-image ( url -- image )
http-get nip
R/ http:\\/\\/imgs\.xkcd\.com\\/comics\\/[^\.]+\.(png|jpg)/
first-match >string load-http-image ;
R/ \/\/imgs\.xkcd\.com\\/comics\\/[^\.]+\.(png|jpg)/
first-match >string "http:" prepend load-http-image ;
: comic-image. ( url -- )
comic-image image. ;