Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Regexps - what am I doing wrong?
- X-seq: zsh-users 15845
- From: kjonca@xxxxx (Kamil Jońca)
- To: zsh-users@xxxxxxx
- Subject: Regexps - what am I doing wrong?
- Date: Mon, 07 Mar 2011 23:24:00 +0100
- Cancel-lock: sha1:Q4LQOaczQMbnrlJe0cgQtQ9oQNA=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Can somebody explain me why in last line zsh responds "yes"?
ZSH_VERSION=4.3.10
--8<---------------cut here---------------start------------->8---
kjonca@alfa:~%q=lll ;if [[ $q =~ ^ERROR.* ]] ; then echo yes ; else echo no ;fi
no
kjonca@alfa:~%q=lll ;if [[ $q =~ ^OK.* ]] ; then echo yes ; else echo no;fi
no
kjonca@alfa:~%q=lll ;if [[ $q =~ ^OK.* || $q =~ ^ERROR.* ]] ; then echo yes ; else echo no ;fi
yes
--8<---------------cut here---------------end--------------->8---
--
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
"Nie można wlecieć w trzecie tysiaclecie
na drzwiach od stodoły" - biskup polowy WP Sławoj Leszek Głódź.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author