Alexis Huxley wrote:
> "Quote removal" means that, as usual, quotes do not form part of the
> arguments, they merely serve to delimit the arguments, I take it.
> "Words between [[ and ]] ... quote removal performed" means on *all*
> words between [[ and ]] I take it. Hmm ... No, that can't be right
> otherwise
>
> bash -c '[[ "apple" =~ "(apple)" ]]; echo ${BASH_REMATCH[1]}'
>
> would say apple. Hmmm ... while the CHANGES file indicates that I
> was wrong that bash is broken, I would say that bash is broken
> *w.r.t. the behaviour documented in its man page*. What do you think?
But bash *does* do quote removal, if you supply quoted arguments. If you do
bash -c '[[ "apple" =~ "(apple)" ]]; echo ${BASH_REMATCH[1]}'
then bash does quote removal and sees
apple =~ (apple)
Then, since the RHS was quoted, it performs string matching instead of re
matching. But before that it did do quote removal nonetheless.
--
D.