Regular expressions
m (Reverted edits by 74.231.24.2 (Talk); changed back to last version by Ninereasons) |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | '''Regular expressions''' are patterns that are used to describe a string of characters. Regular expressions might be used to match substrings in text as a logical condition for doing something in a program, for capturing the text matched by the expression in order to do something with it, and many other uses. Users more familiar with Windows might think of regular expressions as comparable to "wildcards", only wilder. | ||
− | + | From the commandline and in [[shell script]]s, the stream editor ([[sed]]) is used to make substitutions for matched text. <code>egrep</code> (shorthand for <code>grep -E</code>) filters strings using regular expressions. For more complex types of pattern matching and text manipulation, [[Perl]] and [[Tcl]] have a built-in regular expression engine; and most modern programming languages have regular expression modules. | |
+ | |||
+ | == external links == | ||
+ | [http://en.wikipedia.org/wiki/Regular_expression Wikipedia entry] | ||
+ | |||
+ | [[Category:FreeBSD Terminology]] |
Latest revision as of 19:07, 30 September 2007
Regular expressions are patterns that are used to describe a string of characters. Regular expressions might be used to match substrings in text as a logical condition for doing something in a program, for capturing the text matched by the expression in order to do something with it, and many other uses. Users more familiar with Windows might think of regular expressions as comparable to "wildcards", only wilder.
From the commandline and in shell scripts, the stream editor (sed) is used to make substitutions for matched text. egrep
(shorthand for grep -E
) filters strings using regular expressions. For more complex types of pattern matching and text manipulation, Perl and Tcl have a built-in regular expression engine; and most modern programming languages have regular expression modules.