[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFE: allow double quotes to group multi-words & be treated as 1 arg,
From: |
Chet Ramey |
Subject: |
Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~ |
Date: |
Thu, 05 Aug 2010 01:07:26 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1 |
On 8/4/10 8:31 AM, Greg Wooledge wrote:
> In fact, putting the ERE-pattern you want to match against into a variable
> and then using =~ $variable *is* the recommended practice, if you need to
> use =~ at all. It is the only way to get consistent results among all
> the different releases of bash that have =~, since the behavior changed
> multiple times during the 3.x series.
All this is true (as is the text I removed), except that the behavior
changed only once: to make quoted text remove any special meaning of
the quoted characters to the regular expression matcher.
Backwards compatibility, of course, means never having to say you're sorry,
but it also means that you never get to fix anything. The behavior change
fixed a problem, as I saw it, with the initial implementation. Without
this change, there is no clean way to match a literal character that has a
special meaning as a regexp operator.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- basic pattern match Question..."newbie" doesn't understand (!@#$@$), Linda Walsh, 2010/08/01
- Re: basic pattern match Question..."newbie" doesn't understand (!@#$@$), Chris F.A. Johnson, 2010/08/01
- RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~, Linda Walsh, 2010/08/04
- Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~, Davide Brini, 2010/08/04
- Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~, Linda Walsh, 2010/08/04
- Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~, Andreas Schwab, 2010/08/04
- Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~, Greg Wooledge, 2010/08/04
- Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~,
Chet Ramey <=
- Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~, Linda Walsh, 2010/08/05
- Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~, Andreas Schwab, 2010/08/05
- Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~, Chet Ramey, 2010/08/05
- Message not available
- Re: RFE: allow double quotes to group multi-words & be treated as?1?arg, w/DQ's stripped off -- including RH =~, clemens fischer, 2010/08/06
- Message not available
- Message not available
- Re: RFE: allow double quotes to group multi-words & be treated?as?1?arg, w/DQ's stripped off -- including RH =~, clemens fischer, 2010/08/09
- Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~, Marc Herbert, 2010/08/04