Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Regexp
Regexp.SimpleRegexp

Class Regexp.SimpleRegexp

Description

This class implements the interface to a simple regexp engine with the following capabilities:

.Matches any character.
[abc]Matches a, b or c.
[a-z]Matches any character a to z inclusive.
[^ac]Matches any character except a and c.
(x)Matches x (x might be any regexp) If used with split, this also puts the string matching x into the result array.
x*Matches zero or more occurances of 'x' (x may be any regexp).
x+Matches one or more occurances of 'x' (x may be any regexp).
x|yMatches x or y. (x or y may be any regexp).
xyMatches xy (x and y may be any regexp).
^Matches beginning of string (but no characters).
$Matches end of string (but no characters).
\<Matches the beginning of a word (but no characters).
\>Matches the end of a word (but no characters).

Note that \ can be used to quote these characters in which case they match themselves, nothing else. Also note that when quoting these something in Pike you need two \ because Pike also uses this character for quoting.


Inherit _SimpleRegexp

inherit _SimpleRegexp : _SimpleRegexp