Is there any way to compare Text with a regular expression in Motoko?
I don’t think so, but you could write a parser using the parsec
package to achieve the same thing.
https://github.com/kritzcreek/motoko-regex might also be of interest, though I think it was merely meant to illustrate a simple library, not a full fledged regex implementation.
1 Like