Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)
Peter Volkov <pvolkov@mics.msu.su> 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