/motoko-regex

Simple Regexes for Motoko

Primary LanguageModelicaApache License 2.0Apache-2.0

motoko-regex

Simple regex matching for Motoko Text.

This project is in its very early stages and primarily serves as an example of how to structure a Motoko library.

Example

import Regex "mo:regex/Regex";

assert(Regex.test(#rep(#seq(#char('A'), #char('B'))), "ABABABABAB"));
assert(not Regex.test(#rep(#seq(#char('A'), #char('B'))), "ABA"));

Building

  • Install vessel
  • Run make check, make test, or make docs