当前位置导航:炫浪网>>网络学院>>网页制作>>ASP.NET教程

正则表达式生成超级工具The Regulator

The-Regulator
        The Regulator窗口主要分为六部分:Web Search、Regex Analyzer、SnippetsControl、表达式输入区、Match结果区、待解析文本区。比较重要的是Regex Analyzer、表达式输入区、Match结果区、待解析文本区。在默认情况下,Web Search区占了很大位置,可能需要调整一下。

        基本用法:在表达式输入区、待解析文本区 输入你心目中的表达式和待解析文本,然后点菜单栏中的Match,结果会显示在Match结果区。

        如果你想弄清楚一个正则表达式的意思,可以利用Regex Analyzer(在View菜单),不过该功能有时候无法解析出结果,此时可以把表达式输入区 或者待解析文本区 中的内容稍微改一下(比如添加一个空格),或许就可以解析出正确的结果了。比如我输入 \d{2}-\d{5} ,会解析出 Any digit Exactly 2 times - Any digit Exactly 5 times 。可以帮助我们理解一个复杂的正则表达式。
其他有用的功能:生成代码(C# or VB.NET)、直接编译成DLL、从网站检索现成的正则表达式 (Web Search)、保存常用的表达式(SnippetsControl)等等 。

        说到正则表达式,还有一个工具很有名气:Expressohttp://www.ultrapico.com/。这个工具在codeproject上有详细介绍,出品时间也比The Regulator早。The Regulator的作者也受到了Expresso 的影响,才开发的The Regulator。他在The Regulator的帮助文件中说:"The Original idea for The Regulator came from a simple Regex Tester called "Expresso". It was simple and easy to use (to a certain degree), but it mainly prompted the idea in me that I could build something similar with features that I wished I had.
So thanks, Expresso. Couldn′t have done this one without ya! "

相关内容
赞助商链接