set dsc_file_re a-z0-9 a-z0-9 0-9 a-zA-Z0-9 dsc proc parse_filename fi

1
2
3
4
5
6
7
8
9
set dsc_file_re {^([a-z0-9][a-z0-9+.-]+)_([0-9][a-zA-Z0-9.+~-]*?)\.dsc$}
proc parse_filename {filename} {
global dsc_file_re
if {[regexp $dsc_file_re $filename -> name version]} {
return [list $name [split $version ".-"]]
}
}