Development
What is RegEx?
Regular Expression — a sequence of characters defining a search pattern for string matching.
A regular expression (regex or regexp) is a sequence of characters that defines a search pattern. Regex engines scan text to find matches, making them invaluable for validation, extraction, and transformation tasks.
Regex is supported in virtually every programming language. While the core syntax is standard, minor differences exist between implementations (JavaScript, Python, PCRE, etc.).
Core Syntax
.— any character except newline*— zero or more of the preceding+— one or more of the preceding?— zero or one (optional)^— start of string$— end of string\d— any digit\w— any word character[abc]— character class(group)— capturing group
FAQ
How do I test a regex pattern?
Use our Regex Tester to test patterns with live highlighting. Enter your pattern, set flags, and type your test string to see matches instantly.
Related Tools
Related Terms