Incredibly, Bash allows you to do regular expression comparisons with the =~ operator that Ruby and Perl use:

$ if [[ "foo" =~ f.* ]]; then
    echo match
  fi
 
match

http://tldp.org/LDP/abs/html/abs-guide.html#REGEXMATCHREF