Regular expressions (regex or regexp) are patterns that describe sets of strings. They are used in every programming language for searching, matching, and manipulating text. Common uses include form validation (checking if an email address is valid), data extraction (finding all phone numbers in a document), find-and-replace (changing date formats across a codebase), and input sanitization (removing unwanted characters). Regex syntax uses special characters like . (any character), * (zero or more), + (one or more), [] (character sets), and () (groups) to define patterns. While the syntax can be intimidating, most developers only need a handful of common patterns.
glossary2 min read
What is Regex?
Regular expressions (regex) are patterns for matching text. Learn the basics and common use cases.
Try these tools
More glossary articles
What is WebP?
WebP is a modern image format by Google offering superior compression. Learn when and how to use WebP images.
What is HEIC?
HEIC is the default photo format on iPhones. Learn what it is, why Apple uses it, and how to convert it.
What is JSON?
JSON (JavaScript Object Notation) is the standard data format for web APIs. Learn the syntax and common uses.
What is WCAG?
WCAG (Web Content Accessibility Guidelines) defines how to make websites accessible. Learn the levels and requirements.