Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Regular expressions are a means of matching a pattern of characters within a string.

Regular expressions (regex or regexp for short) are patterns that describe a set of strings based on simple syntactic criteria.

Tools such as , and involve regular expression matching as a key feature. Most programming languages include a regular expression library, and most text editors provide regular expression search and replacement.

Shell for file names (also called glob patterns) are a different, less powerful syntax (though ksh, bash and zsh have more powerful extensions). Bash, ksh93 and zsh's =~ operator offer regex matching.

Further reading

history | excerpt history