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 beginning of the
> string, and "$" to anchor it to the end:
> [[ string =~ ^[a-z]$ ]]

Paul is correct; that is the piece I was missing (I am distracted by
the Cleveland-Detroit game).

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to