From: kjonca@o2.pl (Kamil Jońca)
To: zsh-users@zsh.org
Subject: Regexps - what am I doing wrong?
Date: Mon, 07 Mar 2011 23:24:00 +0100 [thread overview]
Message-ID: <87ei6ilgcf.fsf@alfa.kjonca> (raw)
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ź.
next reply other threads:[~2011-03-08 5:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-07 22:24 Kamil Jońca [this message]
2011-03-08 6:13 ` Phil Pennock
2011-03-08 7:09 ` Kamil Jońca
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=87ei6ilgcf.fsf@alfa.kjonca \
--to=kjonca@o2.pl \
--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).