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

Top Page
Delete this message
Author: Sheri
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] grepoutputN 5-1-2007
Philip Hazel wrote:
> 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.
>
>
>

Its still basically listing matches, just gives the user more
flexibility in the formatting of those matches. IMO it would showcase
pcre's capabilities and make pcregrep more useful. But was just a
suggestion. :)

Regards,
Sheri