This program was written to easily check answers for my Discrete math homework.
git clone https://github.com/xirzo/regexmatcher.git
cd regexmatcher
cmake -B build/
cmake --build build/
./build/bin/regexNow you may just edit the bin/main.cpp with your regex and recompile it.
Here’s a sample regex used in the program:
(a|.|-)(a|.|-)*@((a*.*a)|a)((a*.*a)|a)*
| Regex | Input | Result |
|---|---|---|
(a|.|-)(a|.|-)*@((a*.*a)|a)((a*.*a)|a)* |
aaaa@aaaaaaa |
Match |
(a|.|-)(a|.|-)*@((a*.*a)|a)((a*.*a)|a)* |
[email protected] |
Match |
(a|.|-)(a|.|-)*@((a*.*a)|a)((a*.*a)|a)* |
[email protected] |
Match |
(a|.|-)(a|.|-)*@((a*.*a)|a)((a*.*a)|a)* |
[email protected] |
Match |
(a|.|-)(a|.|-)*@((a*.*a)|a)((a*.*a)|a)* |
[email protected] |
Match |
(a|.|-)(a|.|-)*@((a*.*a)|a)((a*.*a)|a)* |
aaaa@..... |
No Match |
(a|.|-)(a|.|-)*@((a*.*a)|a)((a*.*a)|a)* |
aaaa@aaaa.... |
No Match |