From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Matching beginning and end of word
Date: Thu, 8 Oct 2015 09:46:43 -0700 [thread overview]
Message-ID: <151008094643.ZM4110@torch.brasslantern.com> (raw)
In-Reply-To: <20151008102315.0136766a@pwslap01u.europe.root.pri>
On Oct 8, 10:23am, Peter Stephenson wrote:
}
} We do have the special chracter range [[:WORD:]]. So I think you need
} to check both possibilities, using the (#s) for start (or (#e) for end)
} that Bart pointed out yesterday.
The problem is that [^[:WORD:]] matches one character, whereas \< \>
match an empty string in between two characters. It's difficult if
not impossible construct a generic pattern for that. Whether you can
achieve the desired effect depends on the context; Peter's answer is
fine if you're simply comparing, but if an s/// repacement is desired
you have to be more careful.
next prev parent reply other threads:[~2015-10-08 16:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-08 7:51 Sebastian Gniazdowski
2015-10-08 9:23 ` Peter Stephenson
2015-10-08 16:46 ` Bart Schaefer [this message]
2015-10-08 17:44 ` not an error? Ray Andrews
2015-10-08 19:22 ` Bart Schaefer
2015-10-08 19:56 ` Ray Andrews
2015-10-08 20:14 ` Bart Schaefer
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=151008094643.ZM4110@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@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).