Test, debug, and explore regular expressions live with match highlighting, capture groups, replace mode, and a full reference library.
A regular expression (regex or regexp) is a sequence of characters that defines a search pattern. It can be used to search, match, extract, replace, and validate strings with great precision. Regex is supported in virtually every programming language and text editor, making it one of the most universally useful tools in computing.
This tool uses JavaScript's built-in RegExp object, which follows the ECMAScript regex standard. It supports most common features including lookaheads, lookbehinds, named capture groups, Unicode mode (u flag), and the d flag for match indices. Note that some features from other flavours (like PCRE's \K or .NET's balancing groups) are not available in JavaScript.