Difference between revisions of "regular expressions"
Jump to navigation
Jump to search
m (post-import navbar cleanup, and a minor typo fixed) |
(post-move tidying; update) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | [[ | + | ==Navigation== |
− | + | [[computing]]: [[software]]: [[programming]]: [[regular expressions]] | |
− | [[ | + | ==Overview== |
+ | [[regular expressions|Regular expressions]] ("[[regex]]" for short) is a syntax used in string matching and replacement. It is especially heavily used in [[Perl]], and the [[Linux]] utility {{Linuxcmd|grep}} is basically a front end for regex geared towards file-searching. | ||
==Articles== | ==Articles== | ||
− | *[[Perl regex]] | + | * [[Perl regex]] |
− | + | * [[regex manpage]] | |
− | + | ==Examples== | |
− | [[regex]] | + | * \[http://[a-z|0-9|\.|\-]+\.[a-z|0-9|.|\-]+[a-z|0-9|\.|\-\/]* [a-z|0-9| ]+\]( )* |
− | == | + | ** matches a link in [[MediaWiki]] markup (it could probably be more precise, but catches most of them) |
− | + | * (\[http://[a-z|0-9|\.|\-]+\.[a-z|0-9|.|\-]+[a-z|0-9|\.|\-\/]* [a-z|0-9| ]+\]( )*){5,} | |
− | + | ** matches at least 6 links in a row with nothing except spaces between them; good for detecting spam | |
− | + | ==Links== | |
− | + | ===Reference=== | |
− | + | * {{wikipedia|Regular expression}} | |
− | + | * [http://www.regular-expressions.info/ Regular-Expressions.info] | |
− | + | ===Posts=== | |
− | + | * '''2008-04-01''' [http://www.bitcetera.com/en/techblog/2008/04/01/regex-in-a-nutshell/ Regex in a Nutshell]: small collection of links including a how-to, two online testers, and a "cheat sheet" PDF | |
− | + | * '''2006-02-19''' [http://osteele.com/archives/2006/02/reanimator Visualizing Regular Expressions]: blog entry by the author of reAnimator, a regex implementation visualizer | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | * | ||
− | * | ||
− | * | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | ||
− | * | ||
− | * | ||
− | === | ||
− | * | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | *''' |
Latest revision as of 13:36, 26 April 2011
computing: software: programming: regular expressions
Overview
Regular expressions ("regex" for short) is a syntax used in string matching and replacement. It is especially heavily used in Perl, and the Linux utility grep is basically a front end for regex geared towards file-searching.
Articles
Examples
- \[http://[a-z|0-9|\.|\-]+\.[a-z|0-9|.|\-]+[a-z|0-9|\.|\-\/]* [a-z|0-9| ]+\]( )*
- matches a link in MediaWiki markup (it could probably be more precise, but catches most of them)
- (\[http://[a-z|0-9|\.|\-]+\.[a-z|0-9|.|\-]+[a-z|0-9|\.|\-\/]* [a-z|0-9| ]+\]( )*){5,}
- matches at least 6 links in a row with nothing except spaces between them; good for detecting spam
Links
Reference
Posts
- 2008-04-01 Regex in a Nutshell: small collection of links including a how-to, two online testers, and a "cheat sheet" PDF
- 2006-02-19 Visualizing Regular Expressions: blog entry by the author of reAnimator, a regex implementation visualizer