Test regular expressions with real-time matching, flags, and highlighted results.
A regular expression is a sequence of characters that defines a search pattern for matching, finding, and replacing text. Regex is used in programming, text editors, and command-line tools for pattern-based string operations.
g=global, i=case-insensitive, m=multiline, s=dotall, u=unicode
\d+).. Any character\d Digit [0-9]\w Word char\s Whitespace^ Start of line$ End of line* 0 or more+ 1 or more? 0 or 1{n} Exactly n[abc] Character set(group) CaptureFormula
/pattern/flags → match array | nullpattern = Sequence of characters and metacharacters defining the search
flags = Modifiers: g (global), i (case-insensitive), m (multiline), s (dotall), u (unicode)
match array = Array of matched strings; null if no match found
Worked Example
Match all email addresses
Did you know? Regular expressions were invented by mathematician Stephen Cole Kleene in 1951 as a notation for regular languages in automata theory. Ken Thompson later implemented them in the QED text editor (1968), which became the ancestor of grep and modern regex engines.
Sources
Convert text to ASCII codes and back. Supports decimal, hex, binary, and octal formats.
Convert width/height to aspect ratios, scale dimensions, and generate responsive embed CSS for any layout.
Calculate required internet bandwidth based on devices and activities in your household.
Encode and decode Base64 strings. Convert text for data URIs, APIs, and safe data transmission.
Create CSS border-radius with visual controls for each corner. Generate circles, pills, and custom shapes.
Create CSS box shadows with multiple layers, live preview, and copy-ready code.