Difference between revisions of "regular expressions"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (moved regex to regular expressions: proper name)
(post-move tidying; update)
 
Line 1: Line 1:
=={{hide|Navbar}}==
+
==Navigation==
[[computing]]: [[software]]: [[programming]]: [[regex]]
+
[[computing]]: [[software]]: [[programming]]: [[regular expressions]]
 
==Overview==
 
==Overview==
[[regex|Regex]] is shorthand for "Regular Expressions", 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.
+
[[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]]

Latest revision as of 13:36, 26 April 2011

Navigation

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