Indeed, Perl will help you here. Call it like this:
perl find-missing.pl 'KyChr-DB-B-(\d+)' < my_xml_file.pl
Will print just the numeric part of any missing entries.
Hope this helps.
-sam
#!/usr/bin/env perl
use strict;
use warnings;
my $pat = shift;
my $min;
my $max;
my %found;
while (<STDIN>) {
chomp;
if ($pat) {
/$pat/;
$_ = $1;
}
$min = $_ if not defined $min or $min > $_;
$max = $_ if not defined $max or $max < $_;
$found{$_}++;
}
foreach ($min .. $max) {
print "$_\n" unless exists $found{$_};
}
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].