bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] non-greedy regex in gawk


From: Aharon Robbins
Subject: Re: [bug-gawk] non-greedy regex in gawk
Date: Fri, 01 Aug 2014 10:13:24 +0300
User-agent: Heirloom mailx 12.5 6/20/10

Hello.

> Date: Thu, 31 Jul 2014 21:18:15 -0500
> From: Peng Yu <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] non-greedy regex in gawk
>
> Hi,
>
> It is seems that non-greedy regex is still not supported by gawk.

This is an accurate observation.

> Is there a reason why this is not implemented in gawk?

There are many reasons. One of the primary reasons is that the library
code gawk uses for regular expression matching do not support non-greedy
matching. Another reason is that having it would add yet another regexp
flavor to gawk, which already has too many. Not to mention that it would
make gawk incompatible with all other versions of awk.

There are additional reasons as well, but I don't think it's necessary
to list them all.

> I feel having such a feature can be convenient for the users.

You are welcome to your opinion. That's not going to cause anything to change
though.  If you really need non-greedy regular expressions, you will have
to use a different language, such as Perl or Python.

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]