Learn to Test and Debug Regular Expressions
A **regular expression** (abbreviated as regex or regexp) is a sequence of characters that specifies a search pattern in text. Usually, such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation.
Understanding Common Regex Flags
Flags modify the behavior of string-matching operations. You can toggle them in our interactive client:
Finds all matches rather than stopping after the first match.
Ignores difference between lowercase and uppercase characters (e.g. [A-Z] matches [a-z]).
Allows anchors ^ and $ to match start and end of individual lines rather than the whole string.
Forces the dot (.) special character to match newline characters as well.