基本匹配
正则表达式其实就是在执行搜索时的格式,它由一些字母和数字组合而成。
例如:一个正则表达式 the,它表示一个规则:由字母 t 开始,接着是 h,再接着是 e。
"the" => The fat cat sat on **the** mat.
正则表达式 123 匹配字符串 123。它逐个字符的与输入的正则表达式做比较。
正则表达式是大小写敏感的,所以 The 不会匹配 the。
"The" => **The** fat cat sat on the mat.