zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: named capture groups with PCRE matching (Was: PATCH: migrate pcre module to pcre2)
Date: Sat, 6 May 2023 11:56:41 -0700	[thread overview]
Message-ID: <CAH+w=7a943NrJY_PWcPHtHCsR5O21JZwUjefy3xDph3OQ-we+A@mail.gmail.com> (raw)
In-Reply-To: <20230506044445.4bzhi7zpllwtcen2@chazelas.org>

On Fri, May 5, 2023 at 9:44 PM Stephane Chazelas <stephane@chazelas.org> wrote:
>
> 2023-05-06 01:35:46 +0200, Oliver Kiddle:
> [...]
> >  * named capture groups
> >    (either to an associative array or to variables directly?)
> [...]
>
> Maybe [...]
>
> [...] if $match is an associative array, store the named
> capture groups there. Same for pcre_match -a array (or add a -A
> assoc there)

Since this would be new functionality anyway, perhaps it's a good
opportunity to take advantage of namespaces, e.g. ${.pcre.match[foo]}
etc., instead of overloading the existing variables.


  reply	other threads:[~2023-05-06 18:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 23:35 PATCH: migrate pcre module to pcre2 Oliver Kiddle
2023-05-06  4:44 ` named capture groups with PCRE matching (Was: PATCH: migrate pcre module to pcre2) Stephane Chazelas
2023-05-06 18:56   ` Bart Schaefer [this message]
2023-05-06 23:06     ` Oliver Kiddle
2023-05-10 23:26 ` PATCH: migrate pcre module to pcre2 Oliver Kiddle
2023-05-12 23:12 ` Phil Pennock
2023-05-24 18:11   ` Oliver Kiddle
2023-06-13  7:35 ` Jun T
2023-06-19  8:20   ` Jun T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7a943NrJY_PWcPHtHCsR5O21JZwUjefy3xDph3OQ-we+A@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).