The issue is found by Ulrich Mueller: It seems DFA engine does not understand --null-data:
~/dev/git/grep $ cat a-test.sh #!/bin/bash printf '12\n34\0' | LC_ALL=en_US.utf-8 src/grep -z '^[1234yz]*$' | wc -c printf '12\n34\0' | LC_ALL=en_US.utf-8 src/grep -P -z '^[1234yz]*$' | wc -c printf '12\n34\0' | LC_ALL=en_US.utf-8 src/grep -z '^[1234y-z]*$' | wc -c printf '12\n34\0' | LC_ALL=en_US.utf-8 src/grep -P -z '^[1234y-z]*$' | wc -c ~/dev/git/grep $ ./a-test.sh 0 6 6 6 All 4 should return 6 but first is not correct. It seems that 'y-z' range disables dfa.c code and works fine. -- Sergei
signature.asc
Description: PGP signature