Re: [pcre-dev] grepoutputN 5-1-2007

Kezdőlap
Üzenet törlése
Szerző: Philip Hazel
Dátum:  
Címzett: Sheri
CC: pcre-dev
Tárgy: Re: [pcre-dev] grepoutputN 5-1-2007
On Sun, 19 Apr 2009, Sheri wrote:

> If it presupposes the shell would do the printf'ing, I don't think that
> would work in the Windows command environment.


Quite.

> Without the custom string, just 3 choices for line terminators mapped to
> "\n", "\r\n" or "\r", would be an improvement.


That should be similar to the input choices, and straightforward to do.

> If you felt like making a heavyweight enhancement to pcregrep, you could
> invite a format string for the entire match plus the line break. The
> string could include escapes and tokens for pcre whole match ($0) and/or
> numbered or named substrings (e.g., $1 or $<name>). "Hello $1: $3\r\n"


I don't like this because it is starting to turn pcregrep into pcreawk
or pcreperl. It's moving the program from doing a "finding" job into
doing a "processing" job, which is a different kettle of fish.

Philip

--
Philip Hazel