Skip to content

Regex

This package provides regular expressions.

{
"type": "library"
}
{
"dependencies": {
"Regex": "pen:///regex"
}
}

This module provides functions to compile and match regular expressions.

A regular expression.

type Expression {
# ...
}

Compile a regular expression.

\(s string) Expression | error

Check if a regular expression matches with a string or not.

\(e Expression, s string) boolean

Match a regular expression with a string and return matched groups.

\(e Expression, s string) [string | none] | none