diff --git a/regcomp.c b/regcomp.c index a43a6306d7b6..169272e1dd8c 100644 --- a/regcomp.c +++ b/regcomp.c @@ -24679,6 +24679,15 @@ S_parse_uniprop_string(pTHX_ break; } } + + /* Turn nv=-0 into nv=0. These should be equivalent, but vary by + * underling libc implementation. */ + if ( i == name_len - 1 + && name[name_len-1] == '0' + && lookup_name[j-1] == '-') + { + j--; + } } } else { /* No '=' */ diff --git a/t/lib/croak/regcomp b/t/lib/croak/regcomp index a203f136fd6d..321033a485d4 100644 --- a/t/lib/croak/regcomp +++ b/t/lib/croak/regcomp @@ -179,8 +179,3 @@ qr/(?<=(?$&< >a< - # Test minlen for ACCEPT /a?(*ACCEPT)b/ b y >$&< >< - # Test minlen for ACCEPT / (A (*ACCEPT) | BC){2} D{0,4}/x A y $1 A - # ACCEPT optimizer check + +\p{nv=-0} \x{660} y $& \x{660} + # Keep these lines at the end of the file # pat string y/n/etc expr expected-expr skip-reason comment # vim: softtabstop=0 noexpandtab