From: Moritz Bunkus <moritz@bunkus.org>
To: zsh-users@zsh.org
Subject: Re: case-insensitivity of =~ operator
Date: Sat, 19 Jul 2014 14:36:21 +0200 [thread overview]
Message-ID: <20140719123620.GP12213@bunkus.org> (raw)
In-Reply-To: <20140719121937.GN12213@bunkus.org>
[-- Attachment #1: Type: text/plain, Size: 986 bytes --]
Hey,
forgot to mention: this is zsh 5.0.5.
This case gets even weirder. The previous output I posted was gathered
from zsh running with my normal RC files. The output actually differs if
run with -f:
----------------------------------------
match case 1
match case 2
match case 3
match case 5
match case 6
----------------------------------------
Meaning without any RCs case 2 matches, too!
This is all very, very inconsistent…
Still the same test script:
----------------------------------------
#!/bin/zsh
export LC_ALL=C
zmodload zsh/pcre
setopt no_case_match
line=Hello
if [[ $line =~ He ]] print match case 1
if [[ $line =~ he ]] print match case 2
if [[ $line -pcre-match He ]] print match case 3
if [[ $line -pcre-match he ]] print match case 4
pcre_compile He
pcre_match $line && print match case 5
pcre_compile -i He
pcre_match $line && print match case 6
----------------------------------------
Kind regards,
mosu
[-- Attachment #2: Type: application/pgp-signature, Size: 173 bytes --]
prev parent reply other threads:[~2014-07-19 12:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-19 12:19 Moritz Bunkus
2014-07-19 12:31 ` inconsistency in empty argument matching =~/pcre_match Moritz Bunkus
2014-07-19 12:36 ` Moritz Bunkus
2014-07-19 22:21 ` Several PCRE module oddities Bart Schaefer
2014-07-20 7:40 ` Moritz Bunkus
2014-07-20 10:24 ` Roman Neuhauser
2014-07-20 16:14 ` Bart Schaefer
2014-07-20 17:19 ` Peter Stephenson
2014-07-19 12:36 ` Moritz Bunkus [this message]
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=20140719123620.GP12213@bunkus.org \
--to=moritz@bunkus.org \
--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).