本软件由HiFi小组编写,所以保留本关于,本人只是很喜欢他们的设计,但对于他们不回复我做出中文翻译并不理睬表示不解,因此转入自己的网站内,不过仍对做出这么好的验证器的人致以崇高的敬意。因为保留他们的商标是肯定侵权的,所以移除他们的商标并添加自己所作的。因为本人也是正则新手,所以肯定有不足、错误的地方,恳请各位大牛指正,邮箱:mengzhuo1203@gmail.com
This tool was created to help developers learn, test, and write regular expressions. It is written entirely in JavaScript, HTML, and CSS to provide live validation and match feedback on your regexs. This tool relies on JavaScript's regular expression engine which uses perl regex syntax.
As you type your regular expression the background of the box will indicate whether your regex is valid. Red means your regular expression is currently invalid. This will happen when writing matching groups and classes are opened without close, forward slashes are unescaped, etc. Yellow indicates a valid regular expression that does not match any of your input text. Green indicates both a valid expression and a match in your input.
You can click on the main text area to edit the input test your regular expression will match against. General regex matches will be highlighted in yellow. If your regular expression uses matching groups the groups will be highlighted in other colors, too. Finally, regexp matches will be printed in the match table below your input.
To the right of the tool is a cheat sheet for quick reference on the syntax of regular expressions. It is organized by the primary features of the perl regex language.
Here are a few quick regex examples to get you started:
\D?(\d{3})\D?(\d{3})\D?(\d{4})123-456-7890 1234567890 (123)456-7890[A-Z][a-z]*Hello World this does not Match!<(\/?\w+)[^>]*><a href="http://gethifi.com">HiFi CMS</a>The team behind HiFi, a next-generation CMS for designers. You should follow us on Twitter and check out our development blog for other interesting JavaScript and web tools like our Sitemap Creator.