Ruby--正则

1. 只取数字(用的是字符串替换)

gsub(/[^0-9]/, “”)

原文地址:https://www.cnblogs.com/gary-tao/p/5462297.html