Skip to content
Snippets Groups Projects
Commit 26d70524 authored by Robert Goldman's avatar Robert Goldman
Browse files

Fix bug in regexp for version numbers.

Version numbers end with a number, so are:
(digit-block .)+ digit-block
Old regexp didn't have final digit-block.
parent 347a1733
No related branches found
No related tags found
No related merge requests found
......@@ -67,10 +67,14 @@ sub transform_files {
my $file = $entry[0];
print STDERR "Modifying file $file\n";
print STDERR "Prefix is $entry[1], suffix is $entry[2]\n";
my $regex = "(" . $entry[1] . ")" . "([0-9]+\.)+" . "(" . $entry[2] .")";
my $regex = "(" . $entry[1] . ")" . "(([0-9]+\.)+[0-9]+)" . "(" . $entry[2] .")";
my $filename = $asdf_dir . $file;
my $data = read_text($filename);
$data =~ s/$regex/\1$new\3/;
my $count = ($data =~ s/$regex/$1$new$4/);
if ($count == 0) {
die "Unable to replace $regex with $1$new$4";
}
# print STDERR "Writing $data to $filename\n";
write_text($filename, $data);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment