# Awesome Regex ## Introduction A curated collection of awesome Regex libraries, tools, frameworks and software. The goal is to build a categorized community-driven collection of very well-known resources. Inspired by [awesome-dotnet](https://github.com/quozd/awesome-dotnet), [awesome-ruby](https://github.com/markets/awesome-ruby), [awesome-awesomeness](https://github.com/bayandin/awesome-awesomeness) and the whole `awesome-*` trend on GitHub. Thank you [Reddit](http://www.reddit.com/r/regex), [HackerNews](https://news.ycombinator.com/item?id=9581225) and [StackOverflow](http://stackoverflow.com/tags/regex/info) for the help. Sharing, suggestions and contributions are always welcome! Please take a look at the [contribution guidelines and quality standard](https://github.com/aloisdg/awesome-regex/blob/master/CONTRIBUTING.md) first. Thanks to all contributors, you're awesome and wouldn't be possible without you! ## Table Of Contents - [Documentation](#documentation) - [Prototyping and Test](#prototyping-and-test) - [Generator](#generator) - [Learning](#learning) - [Library](#library) - [Collections](#collections) - [Explanation](#explanation) - [Exercise](#exercise) - [Articles](#articles) - [Books](#books) ## Documentation - [Regular Expression Language - Quick Reference](https://msdn.microsoft.com/en-us/library/az24scfc(v=vs.110).aspx) - MSDN documentation about Regex - [Regular Expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) - MDN chapter about JavaScript regular expressions - [Perl Regular Expression Syntax](http://www.boost.org/doc/libs/1_43_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html) - Boost documentation ## Prototyping and Test - [Debuggex](https://www.debuggex.com/) - An online visual regex tester - [RegExr](http://regexr.com/) - A website for interactive regex prototyping with syntax highlighting (by @gskinner) - [Regex101](https://regex101.com/) - An online regex tester, debugger with highlighting - [Rubular](http://rubular.com/) - A Ruby-based regular expression editor and tester - [Rex V](http://www.rexv.org/) - An AJAX Regular EXpression eValuator - [RegViz](http://regviz.org/) - A tool for debugging JavaScript regular expressions in a visual way - [Regulex](https://jex.im/regulex) - A JavaScript Regular Expression Visualizer - [PyRegex](http://www.pyregex.com/) - An online regex tester to check validity of regexp in the Python language regex subset - [pythex](http://pythex.org/) - A quick way to test your Python regular expressions - [Regexper](http://regexper.com/) - A regex visualizer for JavaScript using railroad diagrams - [HiFi Regex Tester](http://www.gethifi.com/tools/regex) - Live JavaScript Regular Expression Tester - [Regex Storm](http://regexstorm.net/tester) - A .NET regex tester with highlighting and detailed results output ## Generator - [Txt2Re](http://www.txt2re.com/index.php3) - Generate Regular expressions based on a string - [Regex Generator++](http://regex.inginf.units.it) - An Automatic Generation of Text Extraction Patterns from Examples - [regexgen](https://github.com/devongovett/regexgen) - Generates regular expressions that match a set of strings. - [RegexGenerator](https://github.com/MaLeLabTs/RegexGenerator) - A tool for generating regular expressions for text extraction (by @MaLeLabTs) ## Learning - [Wikipedia][d1] - Entry on regular expressions - [Learn Regex The Hard Way][d2] - An in-progress book that quickly teaches you regular expressions. - [Regular Expression Matching Can Be Simple And Fast][d3] - Basic concept of how RegEx parsing works - [PDF] [A Tao Of Regular Expressions][d4] - What are Regular Expressions - [Regular-Expressions.info][d5] - An informative website for learning regular expressions - [RexEgg][d6] - A regular expressions tutorial that goes deep into advanced features - [Try Regex][d7] - Try Regex is an interactive regular expressions tutorial - [Udemy][d8] - A Basic Introduction To Using Regular Expressions In Programming - [Codecademy][d9] - How to use of regular expression - [Regex golf][d10] - Regex golf with Peter Norvig - [Python Regular Expressions][d11] - A good introduction to Python Regular Expressions from Google - [/Reg(exp){2}lained/: Demystifying Regular Expressions][d12] - Fluent 2012 talk reviewing and visualizing basic and intermediate Regular Expressions. [d1]: http://en.wikipedia.org/wiki/Regular_expression [d2]: http://regex.learncodethehardway.org/book/ [d3]: http://swtch.com/~rsc/regexp/regexp1.html [d4]: http://linuxreviews.org/beginner/tao_of_regular_expressions/tao_of_regular_expressions.en.print.pdf [d5]: http://www.regular-expressions.info/ [d6]: http://www.rexegg.com/ [d7]: http://tryregex.com/ [d8]: https://www.udemy.com/learning-regular-expressions/ [d9]: http://www.codecademy.com/courses/javascript-intermediate-en-NJ7Lr/0/1 [d10]: https://www.oreilly.com/learning/regex-golf-with-peter-norvig [d11]: https://developers.google.com/edu/python/regular-expressions [d12]: https://www.youtube.com/watch?v=EkluES9Rvak ## Library - [Go-Restructure](https://github.com/alexflint/go-restructure) - Match regular expressions into struct fields in Go (by @alexflint) [js](https://github.com/benjamingr/js-restructure) [C#](https://gist.github.com/benjamingr/4de21494b3e76088e5f7) - [VerbalExpressions](https://github.com/VerbalExpressions) - VerbalExpressions is a cross-language library that helps to construct difficult regular expressions. - [RE2](https://github.com/google/re2) - RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library. ## Collections - [RegExLib](http://regexlib.com/) - Regular Expression Library (5000+ indexed expressions) ## Explanation - [Explain.pl](http://rick.measham.id.au/paste/explain.pl) - Explain Regular Expressions ## Exercise - [Redoku](http://padolsey.github.io/redoku/) - Little Regex Sudoku/Crossword thing (by @padolsey) - [Regex Tuesday - Challenges](https://github.com/callumacrae/regex-tuesday) - Challenge list about Regex - [Regex Crossword](http://regexcrossword.com) - A crossword puzzle game using regular expressions - [RegexOne](http://regexone.com) - Learn regular expressions with simple, interactive examples - [Regular Expression Crossword Puzzle](http://gregable.com/2015/12/regular-expression-crossword-puzzle.html) - A crossword puzzle with a neat web interface. ## Articles - [5 Techniques to Improve Regex Performance](https://www.loggly.com/blog/five-invaluable-techniques-to-improve-regex-performance/) - Craft your own powerful, yet efficient regex - [The Bad, the Better, and the Best](https://www.loggly.com/blog/regexes-the-bad-better-best/) - How a few characters can make a difference in performance - [The Greatest Regex Trick Ever](http://www.rexegg.com/regex-best-trick.html) - So you're doubtful at the mention of a "best regex trick"? - [Treat regular expressions as code, not magic](http://alexwlchan.net/2016/04/regexes-are-code/) - If you don’t write them carefully, you can end up with an unmaintainable monstrosity - [Demystifying The Regular Expression That Checks If A Number Is Prime](https://iluxonchik.github.io/regular-expression-check-if-number-is-prime/) - How a regular expression can check if a number is prime ## Books - [Patterns, Automata, and Regular Expressions](http://infolab.stanford.edu/~ullman/focs/ch10.pdf) - Al Aho and Jeff Ullman (1992) (*chapter 10 of [Foundations of Computer Science](http://infolab.stanford.edu/~ullman/focs.html)*) - [Beginning Regular Expressions](http://shop.oreilly.com/product/9780764574894.do) - Andrew Watt (2005) - [Mastering Regular Expressions](http://shop.oreilly.com/product/9780596528126.do) - Jeffrey E.F. Friedl (2006) - [Regular Expression Pocket Reference](http://shop.oreilly.com/product/9780596514273.do) - Tony Stubblebine (2007) - [Introducing Regular Expressions](http://shop.oreilly.com/product/0636920012337.do) - Michael Fitzgerald (2012) - [Regular Expressions Cookbook](http://shop.oreilly.com/product/0636920023630.do) - Jan Goyvaerts & Steven Levithan (2012) - [Mastering Python Regular Expressions](http://shop.oreilly.com/product/9781783283156.do) - Felix Lopez & Victor Romero (2014) - [JavaScript Regular Expressions](http://shop.oreilly.com/product/9781783282258.do) - Loiane Groner & Gabriel Manricks (2015) # Other awesome lists Other amazingly awesome lists can be found in the [awesome-awesomeness](https://github.com/bayandin/awesome-awesomeness) list, the [awesome](https://github.com/sindresorhus/awesome) list or if you want [more lists](https://github.com/jnv/lists).