zsh-users
 help / color / mirror / code / Atom feed
* backreferences
@ 2015-10-15 18:28 Ray Andrews
  2015-10-15 23:16 ` backreferences Bart Schaefer
  0 siblings, 1 reply; 16+ messages in thread
From: Ray Andrews @ 2015-10-15 18:28 UTC (permalink / raw)
  To: Zsh Users

I'm not sure if this is even a good question:

     test2 ()

    {
    sstring="before inside after"
    if [[ "$sstring" = (#b)([^i]#inside)(*) ]];

    then
       echo "\n\ndo nothing\n\n"
    fi

    echo one $match[1]
    echo two $match[2]
    }


... all good.  But is is possible to populate 'match'
without the 'if' test? Point being that I don't really
want to 'do anything' except populate 'match'.  There's
no problem, I'm just wondering if it can be expressed
more simply and I'll bet it can.

Better question:

In this construction " [^i] " is it possible to use a
string rather than a character in the exclusion test?
I've found convoluted ways to do it, but is there anything
simple?


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-10-17  5:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-15 18:28 backreferences Ray Andrews
2015-10-15 23:16 ` backreferences Bart Schaefer
2015-10-16  1:16   ` backreferences Ray Andrews
2015-10-16  2:30     ` backreferences Bart Schaefer
2015-10-16  4:11       ` backreferences Mikael Magnusson
2015-10-16  4:27         ` backreferences Kurtis Rader
2015-10-16  5:42           ` backreferences Ray Andrews
2015-10-16  5:05         ` backreferences Bart Schaefer
2015-10-16  5:28           ` backreferences Bart Schaefer
2015-10-16  5:46             ` backreferences Ray Andrews
2015-10-16 11:14         ` backreferences Peter Stephenson
2015-10-16  5:36       ` backreferences Ray Andrews
2015-10-16 12:35         ` backreferences Bart Schaefer
2015-10-16 16:37           ` backreferences Ray Andrews
2015-10-17  3:33             ` backreferences Bart Schaefer
2015-10-17  5:16               ` backreferences Ray Andrews

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).