Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
=~ doesn't work with NUL characters
- X-seq: zsh-workers 41281
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: =~ doesn't work with NUL characters
- Date: Tue, 13 Jun 2017 11:02:17 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=GiEEwaYknFVXKZlFaaVvRIsgjVBC8NDarxjRq4aOAp0=; b=MynSYo9YguAzKFyucQXFbWjA2vG9qwogKJi+09h/6FuEUqWqMu3Z7eL3XhP6I59NmF Df+fBMVOvUwv4MtVNtQ6edzFOT0lImbdULyyUdTUbk/QX3RFYK9xnVX0rw9KiVScqE7M opIVRB6fx2eisfTVPD0Sg6/BcmO+MaWZBlW64HGCCF3xCgzGccR0YuGwOT2f3+sUHi31 eYX3IBeeCLxIcVfhVgMBXr6BsPavKlvrJ3c6O3hNr3no8Rb2cp5LscpmpNKbv51/n1nj HHO4D4GwMGzNHBmPEg5ksSpTbdnvyAhOtPz2rHzPmwt811GYYmtrpAcQIZLc/WL0r7hK WK3w==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
[[ $'a\0b' =~ 'a$' ]]
returns true both with and without rematchpcre
Same for
[[ abc =~ $'a\0xy' ]]
If not fixable (I'd expect it should be possible at least with
PCRE though, at least for the subject argument if not for the
pattern (where one can use '\0' to match a NUL)), it would be
worth documenting.
The [[ subject = pattern ]] operator seems to be OK in that
regard.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author