Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

=~ doesn't work with NUL characters



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