Go to the first, previous, next, last section, table of contents.


Pattern (regular expression) matching

Author(s): The CLIP Group.

Version: 1.10#7 (2006/4/26, 19:22:13 CEST)

Version of last change: 1.9#255 (2003/12/30, 23:32:38 CET)

This library provides facilities for matching strings and terms against patterns (i.e., regular expressions).

Usage and interface (patterns)

Documentation on exports (patterns)

PREDICATE: match_pattern/2:

Usage: match_pattern(Pattern, String)

PREDICATE: match_pattern/3:

Usage: match_pattern(Pattern, String, Tail)

PREDICATE: case_insensitive_match/2:

Usage: case_insensitive_match(Pred1, Pred2)

PREDICATE: letter_match/2:

Usage: letter_match(X, Y)

REGTYPE: pattern/1:

Special characters for Pattern are:

*
Matches any string, including the null string.
?
Matches any single character.
[...]
Matches any one of the enclosed characters. A pair of characters separated by a minus sign denotes a range; any character lexically between those two characters, inclusive, is matched. If the first character following the [ is a ^ then any character not enclosed is matched. No other character is special inside this construct. To include a ] in a character set, you must make it the first character. To include a `-', you must use it in a context where it cannot possibly indicate a range: that is, as the first character, or immediately after a range.
|
Specifies an alternative. Two patterns A and B with | in between form an expression that matches anything that either A or B will match.
{...}
Groups alternatives inside larger patterns.
\
Quotes a special character (including itself).

Usage: pattern(P)

PREDICATE: match_pattern_pred/2:

Usage: match_pattern_pred(Pred1, Pred2)


Go to the first, previous, next, last section, table of contents.