Sujet : Re: Experiences with match() subexpressions?
De : arnold (at) *nospam* freefriends.org (Aharon Robbins)
Groupes : comp.lang.awkDate : 11. Apr 2025, 07:33:19
Autres entêtes
Organisation : The Friends of Rational Range Interpretation
Message-ID : <67f8b7af$0$705$14726298@news.sunsite.dk>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
vt9dre$3t3po$1@dont-email.me>,
Janis Papanagnou <janis_papanagnou+
ng@hotmail.com> wrote:
The feature can be very useful,
but not for the case I was looking for. - Actually, it could have
provided the functionality I was seeking, but since GNU Awk relies
on the GNU regexp functions as they are implemented I cannot expect
that any provided features gets extended by Awk. - If GNU Awk would
have an own RE implementation then we could think about using, e.g.,
another array dimension to store the (now only temporary existing,
and generally unavailable) subexpressions.
Actually, this is not so trivial. The data structures at the C level
as mandated by POSIX are one dimensional; the submatches in parentheses
are counted from left to right. There's no way to represent the
subexpressions that are under control of interval expressions, which
would essentially require a two-dimensional data structure.
Mike Haertel is writing a new regexp matcher for gawk; it was announced
here some time agao:
https://github.com/mikehaertel/minrx. The code is
in the feature/minrx branch of the gawk Git repository.
I just opened an issue,
https://github.com/mikehaertel/minrx/issues/43,
about this question. We shall see what develops.
Arnold