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
This commit is contained in:
Flaviu Tamas
2015-01-10 08:16:09 -05:00
parent c4d536f581
commit bfba4b9983
2 changed files with 1 additions and 2 deletions

View File

@@ -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,

View File

@@ -9,7 +9,7 @@ suite "Test NRE initialization":
test "correct options":
expect(SyntaxError): # ValueError would be bad
discard initRegex("[0-9]+",
"89?AEfiJmNOsUWXxY<any><anycrlf><cr><crlf><lf><bsr_anycrlf><bsr_unicode><js>")
"89?AEfimNOsUWXxY<any><anycrlf><cr><crlf><lf><bsr_anycrlf><bsr_unicode><js>")
test "incorrect options":
expect(KeyError): discard initRegex("[0-9]+", "a")