From bfba4b99833b0f92ba58e549117cfa7c66367eac Mon Sep 17 00:00:00 2001 From: Flaviu Tamas Date: Sat, 10 Jan 2015 08:16:09 -0500 Subject: [PATCH] Remove DUPNAMES option It makes the rest of the implementation more complicated and is confusing anyway. The user expects a 1:1 mapping between a match and a name --- src/nre.nim | 1 - test/init.nim | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nre.nim b/src/nre.nim index 381c807084..feae0c2281 100644 --- a/src/nre.nim +++ b/src/nre.nim @@ -15,7 +15,6 @@ let Options: Table[string, int] = { "E" : pcre.DOLLAR_ENDONLY, "f" : pcre.FIRSTLINE, "i" : pcre.CASELESS, - "J" : pcre.DUPNAMES, "m" : pcre.MULTILINE, "N" : pcre.NO_AUTO_CAPTURE, "O" : pcre.NO_AUTO_POSSESS, diff --git a/test/init.nim b/test/init.nim index a3c9f24fef..eddcd6aca5 100644 --- a/test/init.nim +++ b/test/init.nim @@ -9,7 +9,7 @@ suite "Test NRE initialization": test "correct options": expect(SyntaxError): # ValueError would be bad discard initRegex("[0-9]+", - "89?AEfiJmNOsUWXxY") + "89?AEfimNOsUWXxY") test "incorrect options": expect(KeyError): discard initRegex("[0-9]+", "a")