W Wrapl, The Programming Language

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, var1+, ..., vark+) : ResultT

Attempts to match string[start, 0] to regexp. Bracketed expressions are stored in the vari.

:match(regexp @ T, string @ Std.String.T, var1+, ..., vark+) : ResultT

Attempts to match string to regexp. Bracketed expressions are stored in the vari.

:start(result @ ResultT) : Std.Integer.SmallT

Returns the start position of the matching string.

:string(result @ ResultT) : Std.String.T

Returns the matching string.