10 2013 档案

摘要:see:http://stackoverflow.com/questions/3512471/non-capturing-groupusage:(?:http|ftp)://([^/\r\n]+)(/[^\r\n]*)?Match "http://stackoverflow.com/" Group 1: "stackoverflow.com" Group 2: "/"Match "http://stackoverflow.com/questions/tagged/regex" Group 1: "stac 阅读全文
posted @ 2013-10-22 01:53 wxwcase 阅读(288) 评论(0) 推荐(0) 编辑
摘要:see:http://www.rexegg.com/regex-lookarounds.htmlFour ways of using lookarounds:(?= lookahead(?=\d{3} dollars).{3}(Lookahead). Looks ahead for three digits followed by " dollars". Matches "100" in "100 dollars"(?! negative lookahead(?!=\d{3} pesos)\d{3}(Negative Lookahea 阅读全文
posted @ 2013-10-22 01:39 wxwcase 阅读(195) 评论(0) 推荐(0) 编辑
摘要:Enter your regex: .*foo // greedy quantifierEnter input string to search: xfooxxxxxxfooI found the text "xfooxxxxxxfoo" starting at index 0 and ending at index 13.Enter your regex: .*?foo // reluctant quantifierEnter input string to search: xfooxxxxxxfooI found the text "xfoo" st 阅读全文
posted @ 2013-10-21 11:22 wxwcase 阅读(727) 评论(0) 推荐(0) 编辑