Mercurial > hg > lukkari
comparison parselist.pl @ 160:a84b40bc2a99
Add parselist.pl utility and use it in update script.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 17 Aug 2015 22:02:22 +0300 |
parents | |
children | 5f3ec534daa7 |
comparison
equal
deleted
inserted
replaced
159:66f3f02d5172 | 160:a84b40bc2a99 |
---|---|
1 #!/usr/bin/perl -w | |
2 use strict; | |
3 use warnings; | |
4 | |
5 my $patprefix = shift or die("Usage: $0 <prefix> <suffix>\n"); | |
6 my $patsuffix = shift or die("Usage: $0 <prefix> <suffix>\n"); | |
7 | |
8 while (defined(my $line = <STDIN>)) | |
9 { | |
10 $line =~ s/^\s*//; | |
11 $line =~ s/\s*$//; | |
12 | |
13 while ($line =~ /<a href="$patprefix([A-Z]{3}\d\S+)$patsuffix">/ig) | |
14 { | |
15 print "$1\n"; | |
16 } | |
17 } |