You write:
I try to use MAWK where the match() built-in function doesn't have a third value for variable
gawk does support a third argument to match
- an array in which to store the matched text and all captured groups. That is probably what you're looking for. It's documented here.
mawk apparently doesn't support this. Can you simply switch to gawk (e.g., sudo apt install gawk
)? This allowed me to run an old script of mine that relied on the captured groups.