help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: How to repel a space separated quoted strings with ~?
Date: Sun, 5 Jun 2022 11:12:13 +0200	[thread overview]
Message-ID: <CAKc7PVAP997mgSrx4hAk5cEKOwXxpia6sKeH0U-LEJSCkoXv=A@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 615 bytes --]

Consider the following:

x="a b X c' x' d' e' Z"

if [[ $x =   (#b)(((($~ice)*\ )#)((([^[:space:]]#)~(#B)(($~ice)*))\
))#((#B)(($~ice)*\ )##)(Z) ]]; then
    pl $match

a b X c' x'
a b X c'
a b X c'
d' e'

The goal is to match blocks of lower letters specified by ice var possibly
followed by a glued quoted strings and block of a capital letter.  The
repel negation ~ is successful at preventing matching lower letters at the
capital paren however only if not glued by a string.  Is there a way to
repel also such strings ?

The output should be:
c' x' d' e'

[-- Attachment #2: Type: text/html, Size: 1530 bytes --]

             reply	other threads:[~2022-06-05  9:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-05  9:12 Sebastian Gniazdowski [this message]
2022-06-05 12:22 ` Sebastian Gniazdowski

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:

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

  git send-email \
    --in-reply-to='CAKc7PVAP997mgSrx4hAk5cEKOwXxpia6sKeH0U-LEJSCkoXv=A@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-workers@zsh.org \
    --subject='Re: How to repel a space separated quoted strings with ~?' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this 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).