Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re, macros
- template `/` (s: string, flagSym: expr{sym}): expr {.immediate.} =
- var flagList = {reStudy}
- # here the compiler complains `i` is undefined
- let flags = $flagSym
- # if flags.contains('i'):
- # echo("here")
- # flagList.add(reIgnoreCase)
- re(s, flagList)
- let re1 = " "/i
- echo(" ".match(re1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement