Discussion:
is there a non-capturing grouping in gawk regex?
(too old to reply)
Eric Tao
2009-04-19 08:38:49 UTC
Permalink
Hi,

Does gawk support Perl like non-capturing group syntax?
(?:...)
Or if not, how to mimic it?

Thank you!
Barry Margolin
2009-04-19 18:40:31 UTC
Permalink
Post by Eric Tao
Does gawk support Perl like non-capturing group syntax?
(?:...)
I don't think so.
Post by Eric Tao
Or if not, how to mimic it?
Use a2p to convert your awk script to perl.
--
Barry Margolin, ***@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Eric Tao
2009-04-21 13:04:47 UTC
Permalink
Post by Barry Margolin
Post by Eric Tao
Does gawk support Perl like non-capturing group syntax?
(?:...)
I don't think so.
Post by Eric Tao
Or if not, how to mimic it?
Use a2p to convert your awk script to perl.
Thank you all!

a2p is interesting.
Thanks.
Eric Tao
2009-04-21 13:11:01 UTC
Permalink
Post by Barry Margolin
Post by Eric Tao
Does gawk support Perl like non-capturing group syntax?
(?:...)
I don't think so.
Post by Eric Tao
Or if not, how to mimic it?
Use a2p to convert your awk script to perl.
Thank you all!

a2p is interesting.
Thanks.

pk
2009-04-20 09:04:25 UTC
Permalink
Post by Eric Tao
Hi,
Does gawk support Perl like non-capturing group syntax?
(?:...)
Since awk does not support backreferences, I think all parenthesized groups
are non capturing (or if they are, I can't see what for).
pk
2009-04-20 09:10:13 UTC
Permalink
Post by pk
Post by Eric Tao
Hi,
Does gawk support Perl like non-capturing group syntax?
(?:...)
Since awk does not support backreferences, I think all parenthesized
groups are non capturing (or if they are, I can't see what for).
If you're referring to gensub(), I don't think you can use a non capturing
group.
Loading...