On Вск, 2006-05-21 at 15:55 -0400, Paul Jarc wrote:
[a-z] matches only one charater, but the pattern is not required to
match against the entire string.
On Вск, 2006-05-21 at 13:57 -0600, Mike Stroyan wrote:
The =~ regexp match will match a substring by default. You can use ^ and $
to
Hello.
Please CC my email to answers as I'm not subscribed to the list.
I have problems using =~ operator. I've tried to search for answer, but
failed. I'm using GNU bash, version 3.1.17. Can anybody give me some
examples of usage?
I really do not understand why
$ [[ string =~ [a-z] ]] echo
Peter Volkov [EMAIL PROTECTED] wrote:
$ [[ string =~ [a-z] ]] echo something
something
[a-z] matches only one charater, but the pattern is not required to
match against the entire string. You can force it to match the whole
string by using ^ to anchor the pattern to the beginning of the
On 5/21/06, Peter Volkov [EMAIL PROTECTED] wrote:
I have problems using =~ operator. I've tried to search for answer, but
failed. I'm using GNU bash, version 3.1.17. Can anybody give me some
examples of usage?
I really do not understand why
$ [[ string =~ [a-z] ]] echo something
something
Peter Volkov wrote:
Hello.
Please CC my email to answers as I'm not subscribed to the list.
I have problems using =~ operator. I've tried to search for answer, but
failed. I'm using GNU bash, version 3.1.17. Can anybody give me some
examples of usage?
I really do not understand why
Paul Jarc wrote:
Peter Volkov [EMAIL PROTECTED] wrote:
$ [[ string =~ [a-z] ]] echo something
something
[a-z] matches only one charater, but the pattern is not required to
match against the entire string. You can force it to match the whole
string by using ^ to anchor the pattern to the
Chet Ramey wrote:
Peter Volkov wrote:
Please CC my email to answers as I'm not subscribed to the list.
$ [[ string =~ [a-z] ]] echo something
something
...
The real question is whether or not quoting the pattern should work as
it does with other [[ pattern matching operators, which is
Bob Proulx wrote:
Chet Ramey wrote:
Peter Volkov wrote:
Please CC my email to answers as I'm not subscribed to the list.
$ [[ string =~ [a-z] ]] echo something
something
...
The real question is whether or not quoting the pattern should work as
it does with other [[ pattern matching
Chet Ramey wrote:
It seems reasonable that quoting any part of the rhs to the =~
operator should cause it to behave in the same manner.
Since the arguments to [[ don't undergo any of the expansions that
require quoting to protect them, there's no reason for =~ to act
differently than the