WLambda WASM Evaluator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

19 lines
424 B

!@wlambda;
!@import std std;
!@export regex_match \:_regex_match_xxx { !text = _;
!matches = _1;
range 0 (len matches) 2 {
!regex = _ matches;
!fun = (_ + 1) matches;
std:re:match regex text {
fun[_];
return :_regex_match_xxx $n;
};
};
};
!strip_match = \:ret { !(re, text) = @;
std:re:match re text { return :ret $[_.1, _.2] };
$[$n, text]
};