escape.nim 185 B

12345678
  1. import nre, unittest
  2. block: # escape strings
  3. block: # escape strings
  4. check("123".escapeRe() == "123")
  5. check("[]".escapeRe() == r"\[\]")
  6. check("()".escapeRe() == r"\(\)")