[pcre-dev] [Bug 1472] Regexp "(|ab)" not handled in accordan…

Pàgina inicial
Delete this message
Autor: Philip Hazel
Data:  
A: pcre-dev
Assumpte: [pcre-dev] [Bug 1472] Regexp "(|ab)" not handled in accordance with documentation
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1472

Philip Hazel <ph10@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID





--- Comment #2 from Philip Hazel <ph10@???> 2014-04-29 10:25:48 ---
The use of --color has confused things here. The documentation says this: "By
default, as soon as one pattern matches a line, no further patterns are
considered. However, if --colour (or --color) is used to colour the matching
substrings, or if --only-matching, --file-offsets, or --line- offsets is used
to output only the part of the line that matched (either shown
literally, or as an offset), scanning resumes immediately following the match,
so that further matches on the same line can be found." If you had tried it
on a line that did not contain "ab" it would still match.

The further complication is that pcregrep does use PCRE_NOTEMPTY, but only
after it has found one match in a line. So any further matches in a line are
not empty strings.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email