The regexp library - pf-lang/pipefish GitHub Wiki

Note that the name of the library is indeed regexp and not regex, for consistency with Go's naming scheme.

Presently the regexp library contains functions with the following signatures:

  • match(pattern, text string) -> bool

Returns true if a match is found.

  • find(pattern, text string) -> string

Returns the first matching string.

  • findAll(pattern, text string) -> list

Returns a list of all the matching strings.

  • findAllIndex(pattern, text string) -> list

Returns a list of the bounds of all the matching strings, as pairs.