11 lines
234 B
Text
11 lines
234 B
Text
fcn rangex(s){
|
|
fcn(s,re){
|
|
if (re.search(s)){
|
|
a,b:=re.matched[1,*].apply("toInt");
|
|
[a..b].walk();
|
|
}
|
|
else s;
|
|
} :
|
|
s.split(",").pump(List, _.fp1(RegExp(0'|(.*\d+)-(.*\d+)|)))
|
|
.flatten().concat(",");
|
|
}
|