AFAIK, no captures available in POSIX awk (i.e., what we get delivered with z/OS), only in gawk-only extended matching functions like gensub() and in gawk split() with the optional gawk-only arguments to split out parsed groups into arrays.
Peter -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Seymour J Metz Sent: Tuesday, May 26, 2020 6:50 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How to get last node in DFSORT > And Sri's example contained a node longer than 8 bytes. Well, if it were up to me z/OS would support cataloged data sets with longer index levels, but circumstances being what they are I'd rather not parse them. Besides, they're only valid inside of apostrophes. If the problem definition changes then the regex must change with it, but it's still fairly straightforward. Doesn't awk have captures these days? -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN