[Ruby-0]正则表达式(regular expression)
Ruby的正则表达式定义在两个/中,如
A.match /\d+/
=~
=~返回第一给对应到的字符的index,否则返回nil
"Do you like cats?" =~ /like/

如果你不在乎对应字母的index,也可以使用String#include?
范围(Range)
[0-9]匹配任意0到9的数字
[a-z]匹配任意a到z的字母
[^a-z]匹配任意不是a到z的字符
def contains_number(str