Regular expressions allow to match different expressions with a pattern. For example, the regular expression:
awill match with any line that contains an `a' character at any position, like, for example,
all is here.
anytime at all!
Over the seaRegular expressions are a standard way of constructing the matching patterns. Regular expression building blocks are:
character `c
' is taken as a literal (without metacharacter meaning)
^
the regular expression that follows this character must be found at the beggining of the line.
$
the regular expression that precedes this character must be found at the end of the line.
.
matches any individual character, except for newline.
[...]
one of any of the characters specified between the square brackets. Ranges can also be specified, like a-z, A-Z, 1-6, etc. If the ^
appears at te beggining, this means any character that is not one of the defined class of characters.
\n
when used in the second option for a Replace command, \x
obtains the n-positioned \(...\)
r*
matches with zero or more ocurrences the regular expression r.
r+
matches with one or more ocurrences the regular expression r.
\(r\)
stores the pattern between \(
and \)
for its latter obtaining with \x
.
A