zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: Johan Grande <nahoj@crans.org>, zsh-workers@zsh.org
Subject: Re: Pattern bug on (a*|)~^(*b)
Date: Wed, 2 Aug 2023 10:37:21 +0100 (BST)	[thread overview]
Message-ID: <616796427.1643271.1690969041187@mail.virginmedia.com> (raw)
In-Reply-To: <cadb2424-4071-c4c7-0bd0-ccfb24411fb0@crans.org>


> On 02/08/2023 09:31 Johan Grande <nahoj@crans.org> wrote:
> 
>  
> Le 01/08/2023 à 15:30, Peter Stephenson a écrit :
> > On 01/08/2023 14:19 Johan Grande <nahoj@crans.org> wrote:
> >> So I'm thinking I could filter for user-provided patterns that contain
> >> '|' and don't put them in the mega-pattern but filter for them
> >> post-globbing. Does that sound like a sound solution to you?
> > 
> > Yes, I think that would be OK.  [...]
> 
> Actually, an AND can be expressed as a combination of ORs and NOTs. So I 
> can build patterns such as
> 
> ^(^(pat1)|^(pat2))
> 
> and never introduce ~. (With pat1 and pat2 arbitrary.) Basis tests show 
> it working. Can you see any issue I might run into if I implement my 
> queries like this?

That certainly shouldn't tickle this problem since the exclusions
operate locally, so the problematic string recording positions is
recreated each time.  It's probably a bit less efficient since the
exclusions do some memory management for that state record, but
if that's not causing you a problems you should be fine.

pws


  reply	other threads:[~2023-08-02  9:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 13:19 Johan Grande
2023-07-25 18:35 ` Bart Schaefer
2023-07-25 18:47   ` Johan Grande
2023-07-28  1:02     ` Bart Schaefer
2023-07-28  6:41       ` Stephane Chazelas
2023-07-29  1:35         ` Bart Schaefer
2023-08-01 13:19           ` Johan Grande
2023-08-01 13:30             ` Peter Stephenson
2023-08-01 13:46               ` Johan Grande
2023-08-02  8:31               ` Johan Grande
2023-08-02  9:37                 ` Peter Stephenson [this message]
2023-07-31 11:36 ` Peter Stephenson
2023-07-31 15:21   ` Peter Stephenson

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=616796427.1643271.1690969041187@mail.virginmedia.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=nahoj@crans.org \
    --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).