$1,$2...是表示的小括号里的内容 $1是第一个小括号里的 ,$2是第2个小括号里的 比如 /gai([w]+?)over([d]+)/ 匹配 gainover123 $1= 括号里的 n $2= 第2个括号里的 123