nim-regex icon indicating copy to clipboard operation
nim-regex copied to clipboard

Inject named groups as vars into match macro scope

Open nitely opened this issue 4 years ago • 0 comments

ex:

match "1-2 c abc", rex"(?P<a>\d+)-(?P<b>\d+) (?P<c>\w): (?P<pwd>\w*)":
  doAssert a == "1"
  doAssert b == "2"
  doAssert c == "c"
  doAssert pwd == "abc"

nitely avatar Dec 09 '20 05:12 nitely