diff options
author | Stephane Chazelas <stephane.chazelas@gmail.com> | 2014-02-25 15:55:04 +0000 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2014-02-25 09:53:34 -0800 |
commit | 0b5003dd7c485bceba81cf8ffa901f3646c2417d (patch) | |
tree | fd696902f342042dcfd412c5d1c43c99b493d536 /tests/posix-bracket | |
parent | bc4e0307da6fc43b897e7a16c56b36e7f5990832 (diff) | |
download | grep-0b5003dd7c485bceba81cf8ffa901f3646c2417d.tar.gz |
align grep -Pw with grep -w
For the -w option, with -P, we used to look for the pattern surrounded by
word boundaries. That's different from what grep -w does and what the
documentation describes. Now align with grep -w and the documentation by
using PCRE look-behind and look-ahead operators to match the pattern if
it is not surrounded by word constituents.
* src/pcresearch.c (Pcompile): Use (?<!\w)(?:...)(?!\w) rather than
\b(?:...)\b.
* NEWS (Bug fixes): Mention it.
* tests/pcre-w: New file.
* tests/Makefile.am (TESTS): Add it.
This complements the fix for http://debbugs.gnu.org/16865
Diffstat (limited to 'tests/posix-bracket')
0 files changed, 0 insertions, 0 deletions