From: Junio C Hamano <junio@pobox.com>
To: Brandon Casey <casey@nrlssc.navy.mil>
Cc: git@vger.kernel.org, johannes.schindelin@gmx.de,
Brandon Casey <drafnel@gmail.com>
Subject: Re: [PATCH 1/3] t/lib-pager.sh: remove unnecessary '^' from 'expr' regular expression
Date: Mon, 21 Jun 2010 11:11:00 -0700 [thread overview]
Message-ID: <7vd3vki7d7.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <__CrpvAIIX9lgHHkBLHB9fuuN7Rspzl7LFSDSwXwVCT6rYs_YOUHNMf7JZQbKaPHRl6AjsJ9dx8@cipher.nrlssc.navy.mil> (Brandon Casey's message of "Mon\, 21 Jun 2010 12\:37\:13 -0500")
Brandon Casey <casey@nrlssc.navy.mil> writes:
> From: Brandon Casey <drafnel@gmail.com>
>
> Regular expressions matched by 'expr' have an implicit '^' at the beginning
> of them and so are anchored to the beginning of the string.
Oh, of course; I should have caught this earlier.
$ git grep -n -e 'expr .*: .*['\''"]^'
t/lib-pager.sh:12:if expr "$less" : '^[a-z][a-z]*$' >/dev/null
t/t7005-editor.sh:16:if ! expr "$vi" : '^[a-z]*$' >/dev/null
t/t7006-pager.sh:113: ! expr "$firstline" : "^[a-zA-Z]" >/dev/null
I'll fix the other two; thanks.
prev parent reply other threads:[~2010-06-21 18:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-21 17:37 [PATCH 1/3] t/lib-pager.sh: remove unnecessary '^' from 'expr' regular expression Brandon Casey
2010-06-21 17:37 ` [PATCH 2/3] t/t7811-grep-open.sh: ensure fake "less" is made executable Brandon Casey
2010-06-21 17:37 ` [PATCH 3/3] t/t7811-grep-open.sh: remove broken/redundant creation of fake "less" script Brandon Casey
2010-06-21 18:11 ` Junio C Hamano [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=7vd3vki7d7.fsf@alter.siamese.dyndns.org \
--to=junio@pobox.com \
--cc=casey@nrlssc.navy.mil \
--cc=drafnel@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
/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.
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).