gitmyhub

regexr

JavaScript ★ 10k updated 11mo ago

RegExr is a HTML/JS based tool for creating, testing, and learning about Regular Expressions.

The source code behind regexr.com, an interactive website where you write a regex pattern and see matches highlight in real time, with hover explanations for every part of the expression.

JavaScriptNode.jsGulpsetup: easycomplexity 2/5

RegExr is the source code for the website at regexr.com, an online tool for working with regular expressions. A regular expression is a pattern written in a small, specialized syntax that lets you search, match, and manipulate text in precise ways. They appear in almost every programming language, but the syntax can be hard to learn without a way to test patterns interactively.

The site lets you type a regular expression in one panel and some sample text in another, and it highlights the matches in real time as you type. Hovering over part of the expression or a match shows an explanation of what that part does, which helps with understanding what went wrong when a pattern does not behave as expected. The tool supports two flavors of regular expression: JavaScript and PHP/PCRE, which are common in web development.

Beyond basic matching, RegExr includes a reference section with examples, a Tools panel for inspecting results in different ways, undo and redo support in the editors, and the ability to save and share a particular expression via a URL. There is also a community library of patterns that other users have submitted, which you can search and rate.

The README notes that this is the codebase behind the hosted website. If you want to run it yourself, it uses Node.js and a build tool called Gulp. Running the default Gulp task starts a local development server. The project is licensed under GPL v3, and the README mentions the option to contact the authors if you need different licensing terms.

Where it fits