瞎乎 出品
瞎乎第二期:正则表达式之瑞士军刀html
正则表达式(Regular Expression),这是一块硬骨头,很难啃,可是啃着又很香。git
正则表达式使用单个字符串来描述、匹配一系列匹配某个句法规则的字符串。不少地方咱们都须要使用正则,因此今天就将一些优秀的教程,工具总结起来。github
https://en.wikipedia.org/wiki/Regular_expression 了解同样东西,固然先从WIKI开始最好了。正则表达式
// Regular Expression examples I had a \S+ day today [A-Za-z0-9\-_]{3,16} \d\d\d\d-\d\d-\d\d v(\d+)(\.\d+)* TotalMessages="(.*?)" <[^<>]>
http://deerchao.net/tutorials/regex/regex.htm 30分钟入门教程,网上流传甚广
https://qntm.org/files/re/re.html 55分钟教程【英文】,
http://regex.learncodethehardway.org/book/ 一本简单的书,每一节就是一块内容
https://swtch.com/~rsc/regexp/regexp1.html 正则匹配原理解析
http://stackoverflow.com/tags/regex/info stackoverflow 正则标签,标签下有值得点击的连接,一些典型的问题
http://regexr.com/ 正则学习测试于一身
https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Regular_Expressions MDN出品,JavaScript方面内容express
其实最好仍是不断实践,进行实际测试:ide
https://regex101.com/ in JavaScript, Python, PCRE 16-bit, generates explanation of pattern
https://www.debuggex.com/ 正则验证测试,清晰明了
https://mengzhuo.org/regex/ 中文版正则验证测试
http://refiddle.com/ 测试工具
http://myregexp.com/ 也是测试工具,均可以试一试工具
http://regex.alf.nu 闯关模式练习正则表达式,完成一个个正则匹配的测验
http://regexone.com/ 经过实际练习掌握正则表达式
https://regexcrossword.com/ 正则挑战,有不一样难度,很丰富
http://callumacrae.github.io/regex-tuesday/ 正则挑战,完成正则匹配要求学习
https://msdn.microsoft.com/zh-cn/library/az24scfc.aspx MSDN 微软出品
http://www.jb51.net/tools/regex.htm 经常使用正则表达式,如匹配网址、日期啊这种,这个谷歌一搜不少的
https://www.cheatography.com/davechild/cheat-sheets/regular-expressions/ 速查表地址,以下图测试