This module has been obsoleted by the
This module contains functions for regular expression matching and substitution.
Finds the first, longest match of the regular expression
if the match succeeded.
if there were no matching characters.
if there was an error in
Finds the first match of the regular expression
if the match succeeded.
if there were no matching characters.
if there was an error in
Finds all non-overlapping matches of the
expression
if the regular expression was correct.
The list will be empty if there was no match. Each element in the list looks like
if there was an error in
Substitutes the first occurrence of a substring matching
if
if there is an error in
The same as
if
if there is an error in
If the separator expression is
to indicate that the string has been split up into the fields of
if there is an error in
Converts the
matches any string including the null string.
matches any single character.
matches any of the enclosed characters. Character
ranges are specified by a pair of characters separated
by a
It may sometimes be more practical to use
Parses the regular expression
Returns a string which describes the error
The regular expressions allowed here is a subset of the set found
in
matches the non-metacharacter
matches the escape sequence or literal character
matches any character.
matches the beginning of a string.
matches the end of a string.
character class, which matches any of the characters
negated character class, which matches any character except
alternation. It matches either
concatenation. It matches
matches one or more
matches zero or more
matches zero or one
grouping. It matches
The escape sequences allowed are the same as for Erlang strings:
backspace
form feed
newline (line feed)
carriage return
tab
escape
vertical tab
space
delete
the octal value ddd
The hexadecimal value
The hexadecimal value
any other character literally, for example
To make these functions easier to use, in combination with the
function
Atoms [a-z][0-9a-zA-Z_]* Variables [A-Z_][0-9a-zA-Z_]* Floats (\\+|-)?[0-9]+\\.[0-9]+((E|e)(\\+|-)?[0-9]+)?
Regular expressions are written as Erlang strings when used with the functions in this module. This means that any
It is not really necessary to have the escape sequences as part of the regular expression syntax as they can always be generated directly in the string. They are included for completeness and can they can also be useful when generating regular expressions, or when they are entered other than with Erlang strings.