An open API service indexing awesome lists of open source software.

https://github.com/luizfelipedasilva678/regex-engine

Regex implementation using Thompson's construction algorithm
https://github.com/luizfelipedasilva678/regex-engine

nfa regex

Last synced: 3 months ago
JSON representation

Regex implementation using Thompson's construction algorithm

Awesome Lists containing this project

README

          

# Regex engine

This is a regex implementation using [Thompson's construction algorithm](https://en.wikipedia.org/wiki/Thompson%27s_construction#:~:text=In%20computer%20science%2C%20Thompson's%20construction,strings%20against%20the%20regular%20expression.).

This was done just for educational purpose and I don`t think you should use this in production environments.

Supported meta characters:

| Meta character | Description |
| -------------- | ------------ |
| ? | zero or one |
| \* | zero or more |
| \| | alternate |
| + | one or more |

You can see more informations about how to create your own regex engine [here](https://swtch.com/~rsc/regexp/regexp1.html) (I used this article as a reference).