"\\w+@\\w+[.]\\w+"和之间有什么区别"^\\w+@\\w+[.]\\w+$"?我试图谷歌,但没有运气.
var r = "\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b"; //http://www.regular-expressions.info/examples.html
var a = "http://www.example.com/landing.aspx?referrer=10.11.12.13";
var t = a.match(r); //Expecting the ip address as a result but gets null
Run Code Online (Sandbox Code Playgroud)
以上是我从字符串中提取ip地址的代码.但它没有这样做.请告知失败的地方.