07-20-2017, 05:58 PM
Function FE_RegexExample
Macro Macro2871
With files better use standard code with FE_Dir, and use findrx in the loop. Regular expression inside a foreach-function like FE_Dir would not make faster.
;/
function str&match $regex $string_ [submatch]
int i k
i=findrx(string_ regex i 0 k submatch)
if(i<0) ret
match.get(string_ i k)
i+k
ret 1
Macro Macro2871
str s="qwe 123 rty 45 uio 6"
str match
foreach match "\d+" FE_RegexExample s
,out match
With files better use standard code with FE_Dir, and use findrx in the loop. Regular expression inside a foreach-function like FE_Dir would not make faster.