Building a Motoko Regex Engine

Hello Motoko Developers,

I’m excited to share the first article in my four-part series, created as part of a developer grant for my Motoko regex engine. You can read the article here: https://link.medium.com/w2QEghJbsOb. To experiment with the lexer’s functionality, visit the Motoko Playground here: https://m7sm4-2iaaa-aaaab-qabra-cai.raw.ic0.app/?tag=2386595171. If you’d like to explore the code further, the repository is available on GitHub: GitHub - Demali-876/motoko_regex_engine: Regex Engine built in Motoko Programming Language.

Looking forward to your feedback!

6 Likes

Very cool, thank you. Lots of us need it but didn’t want to make it lol

1 Like

Could you make a mops package?
https://mops.one/

I had to switch construction algorithms a number of times because none of them seemed to handle all the edge cases. In the end, I had to combine them to make it work. I will be publishing the package once i’ve fully completed the base features, I have to collect more information about assertions in the compiler so i can implement them in the matcher. I have some outstanding matcher methods like search and find to implement and improving flags. Once that is done I’ll post it to mops, it’ll go open source so the community can add or remove methods as they see fit.

2 Likes