Wrapl, The Programming Language
Main
News
Documentation
Download
Links
Forum
Regexp
Types
T
ResultT
Functions
New
Methods
@
end
match
match
start
string
Libraries
:
Util
:
Regexp
Types
T
A regular expression.
ResultT
The result of a regular expression match.
Functions
New(
regexp
@
Std.String.T
) :
T
Compiles
regexp
into a regular expression and returns it.
Methods
:@(
_
@
ResultT
,
_
=
Std.String.T
)
:end(
result
@
ResultT
) :
Std.Integer.SmallT
Returns the end position of the matching string.
:match(
regexp
@
T
,
string
@
Std.String.T
,
start
@
Std.Integer.SmallT
,
var
1
+
, ..., var
k
+
) :
ResultT
Attempts to match
string
[
start
,
0
]
to
regexp
. Bracketed expressions are stored in the
var
i
.
:match(
regexp
@
T
,
string
@
Std.String.T
,
var
1
+
, ..., var
k
+
) :
ResultT
Attempts to match
string
to
regexp
. Bracketed expressions are stored in the
var
i
.
:start(
result
@
ResultT
) :
Std.Integer.SmallT
Returns the start position of the matching string.
:string(
result
@
ResultT
) :
Std.String.T
Returns the matching string.