Skip to content
regular expression

File:Antony08.gif · Wikimedia Commons · See Wikimedia Commons

EntityQ185612· pop 70· linked from 560 articles

regular expression

Sign in to save

Also known as regex, regexp, regxp, RegExp, rational expression, Complement operator (regular expressions), regular expressions, rational expressions

sequence of characters that forms a search pattern

AI overview

A regular expression is a sequence of characters that you can use to search for and find specific text patterns in documents or data. It matters because it lets you quickly locate, extract, or replace information without having to manually search through everything yourself.

AI-generated from the Wikipedia summary — may contain errors.

Described at

RegExr: Learn, Build, & Test RegEx

Regular expression tester with syntax highlighting, PHP / PCRE & JS Support, contextual help, cheat sheet, reference, and searchable community patterns.

regexr.com

Edit the Expression & Text to see matches. Roll over matches or the expression for details. PCRE & JavaScript flavors of RegEx are supported. Validate your expression with Tests mode. The side bar includes a Cheatsheet, full Reference, and Help. You can also Save & Share with the Community and view patterns you create or favorite in My Patterns. Explore results with the Tools below. Replace & List output custom results. Details lists capture groups. Explain describes your expression in plain English. Build a suite of tests that your expression should (or should not) match. Create new tests with the 'Add Test' button. Click a test to edit the name, type, & text. Any unsaved changes will be lost. Saved patterns & favorites will be migrated to your account.

Excerpt from a page describing this subject · 2,795 chars · not written by Vinony

Wikidata facts

Show 6 more facts
Commons category
Regex
described at URL
regexr.com
time of discovery or invention
1951-00-00
P13411
Tonga
Sources (7)

via Wikidata · CC0

~40 min read

Article

Blue highlights show the match results of the regular expression pattern: /r[aeiou]+/g (lowercase r followed by one or more lowercase vowels).

A regular expression (shortened as regex or regexp), sometimes referred to as a rational expression, is a sequence of characters that specifies a match 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. Regular expression techniques are developed in theoretical computer science and formal language theory.

Gallery (3)

Connections

Categories