[pcre-dev] [Bug 2245] new operators request for beginning an…

Página superior
Eliminar este mensaje
Autor: admin
Fecha:  
A: pcre-dev
Asunto: [pcre-dev] [Bug 2245] new operators request for beginning and end of file
https://bugs.exim.org/show_bug.cgi?id=2245

Philip Hazel <ph10@???> changed:

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


--- Comment #2 from Philip Hazel <ph10@???> ---
Perhaps the poster is thinking about pcre2grep rather than the PCRE library?
It would be relatively straightforward to add a new option to pcre2grep
(called, say, --first-line) which would require any match to begin in the first
line of the file (multi-line searching could continue onto other lines). This
would make it easy to do things like finding files that start with matching
text. However, it would be more difficult to do something similar at the end of
files because, when multi-line matching is enabled, you wouldn't know how far
back to start the search. I suppose one could just do all the normal searches
and ignore any that do not end within the last line, but that seems
ridiculously expensive.

I'm going to close this bug as INVALID, however, because, as Zoltan says,
there's no concept of "file" in the PCRE regex matching engine.

--
You are receiving this mail because:
You are on the CC list for the bug.