From: Peter Stephenson <email@example.com>
To: Zsh hackers list <firstname.lastname@example.org>
Subject: Re: Extending regexes
Date: Mon, 4 Jul 2022 14:47:39 +0100 (BST) [thread overview]
Message-ID: <email@example.com> (raw)
> On 04 July 2022 at 13:03 Sebastian Gniazdowski <firstname.lastname@example.org> wrote:
> Zsh has extensions to regular regexes - the ~ and ^ negations.
> Therefore I thought that it's weird that such an useful feature is missing
> from the commonly used regex syntax. So maybe an attempt of updating it has
You're quite right both that they're very useful in zsh and there's nothing
like this in normal regular expressions, but unfortunately I've got a strong
feeling this is a big can of worms [hope that image is graphic enough that
I don't need to explain the phrase for non-native English speakers].
I say that as although I'm not very up on the mathematics of regular expressions
I did write the basics of the current zsh implementation of glob negations.
(Before that, there was an even less efficient implementation that created a
structure for each part of the pattern, which wasn't good for memory management
--- this is going back to the 1990s, I think.) There are some pretty pathological
details to make sure this works in every case, so I'd really want a real expert in
the subject area to think about this before it got much further.
next prev parent reply other threads:[~2022-07-04 13:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-04 12:03 Sebastian Gniazdowski
2022-07-04 13:47 ` Peter Stephenson [this message]
2022-07-04 19:15 ` Bart Schaefer
2022-07-04 19:41 ` Peter Stephenson
2022-07-06 10:03 ` Daniel Shahaf
2022-07-06 18:40 ` stephane
2022-07-06 23:07 ` Phil Pennock
2022-07-07 0:22 ` Bart Schaefer
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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
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).