How to resolve the algorithm Rosetta Code/Fix code tags step by step in the zkl programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Rosetta Code/Fix code tags step by step in the zkl programming language
Table of Contents
Problem Statement
Fix Rosetta Code deprecated code tags, with these rules:
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Rosetta Code/Fix code tags step by step in the zkl programming language
Source code in the zkl programming language
fcn replace(data,src,dstpat){
re,n,buf:=RegExp(src),0,Data();
while(re.search(data,True,n)){
matched:=re.matched; // L(L(12,3),"c")
data[matched[0].xplode()]=re.sub(data,dstpat,buf); // "\1" --> "c"
n=matched[0].sum(0); // move past change
}
}
data:=File.stdin.read();
foreach src,dst in (T(
T(0'|<(\w+)>|, 0'||), T(0'|(\w+)>|,"" "lang>"),
T(0'||,0'||) )){
replace(data,src,dst)
}
print(data.text);
You may also check:How to resolve the algorithm Rosetta Code/Rank languages by popularity step by step in the Seed7 programming language
You may also check:How to resolve the algorithm Humble numbers step by step in the Haskell programming language
You may also check:How to resolve the algorithm 100 doors step by step in the OpenEdge/Progress programming language
You may also check:How to resolve the algorithm Function definition step by step in the PL/I programming language
You may also check:How to resolve the algorithm Simple windowed application step by step in the Kotlin programming language