Regular Expressions (aka regexes) are strings that describe specific characters.
They may be used in place of something else, or to make searches more versatile,
and vary between programming languages.
More common regexes include \t
for tab, \n
to specify a new line.
Others are shown in the table below.
Table: Common regular expressions.
Character | Usage |
---|---|
^ | matches beginning of lines |
$ | matches end of lines |
. | matches single characters |
* | matches zero or non-initial character appearances |
[chars] | matches the specified characters; ranges denoted with - symbol |
[0-9] | matches a single number |
[a-zA-Z] | matches a single letter |