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
- Host: GitHub
- URL: https://github.com/luizfelipedasilva678/regex-engine
- Owner: luizfelipedasilva678
- License: mit
- Created: 2024-02-19T01:24:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-16T21:52:04.000Z (over 1 year ago)
- Last Synced: 2025-12-09T00:24:12.414Z (7 months ago)
- Topics: nfa, regex
- Language: TypeScript
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).