A lot could be achieved by abusing the stdtmpl filter:
#? stdtmpl(emit="")
#import processcode
#regexReplace r".a", "mi", "" &
echo "Manamana"
Run
where
# processcode.nim
import macros, re
macro regexReplace*(sub, by, src: string): untyped =
src.strVal.replace(sub.strVal.rex, by.strVal).parseStmt
Run
but unfortunately the re module doesn't work in the VM :o/
