zsh-workers
 help / color / mirror / code / Atom feed
* =~ doesn't work with NUL characters
@ 2017-06-13 10:02 Stephane Chazelas
  2017-06-14 20:49 ` Phil Pennock
  0 siblings, 1 reply; 6+ messages in thread
From: Stephane Chazelas @ 2017-06-13 10:02 UTC (permalink / raw)
  To: Zsh hackers list

[[ $'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


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

end of thread, other threads:[~2017-06-15  9:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-13 10:02 =~ doesn't work with NUL characters Stephane Chazelas
2017-06-14 20:49 ` Phil Pennock
2017-06-14 23:08   ` Bart Schaefer
2017-06-15  7:38   ` Peter Stephenson
2017-06-15  8:18   ` Stephane Chazelas
2017-06-15  9:50   ` Stephane Chazelas

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