From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3462 invoked by alias); 19 Jul 2014 12:36:36 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18964 Received: (qmail 13868 invoked from network); 19 Jul 2014 12:36:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Sat, 19 Jul 2014 14:36:21 +0200 From: Moritz Bunkus To: zsh-users@zsh.org Subject: Re: case-insensitivity of =~ operator Message-ID: <20140719123620.GP12213@bunkus.org> References: <20140719121937.GN12213@bunkus.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rJ8inJ6ig7iY3YX9" Content-Disposition: inline In-Reply-To: <20140719121937.GN12213@bunkus.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Virus-Scanned: clamav-milter 0.98.1 at liselle X-Virus-Status: Clean --rJ8inJ6ig7iY3YX9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey, forgot to mention: this is zsh 5.0.5. This case gets even weirder. The previous output I posted was gathered =66rom 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=E2=80=A6 Still the same test script: ---------------------------------------- #!/bin/zsh export LC_ALL=3DC zmodload zsh/pcre setopt no_case_match line=3DHello if [[ $line =3D~ He ]] print match case 1 if [[ $line =3D~ 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 --rJ8inJ6ig7iY3YX9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iD8DBQFTymZEvM968LZXH8oRAqG2AJ9cVFypLSYYskaEbHBJ22HHKNbREwCg3PYA hYo18tE+Pcy4Rd6gNReWcnE= =ZHBn -----END PGP SIGNATURE----- --rJ8inJ6ig7iY3YX9--