https://github.com/notapenguin0/regexgenerator
A C++ Regex Generator. Build regexes as if you were writing them in English.
https://github.com/notapenguin0/regexgenerator
Last synced: over 1 year ago
JSON representation
A C++ Regex Generator. Build regexes as if you were writing them in English.
- Host: GitHub
- URL: https://github.com/notapenguin0/regexgenerator
- Owner: NotAPenguin0
- License: gpl-3.0
- Created: 2019-02-04T18:05:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-04T18:09:22.000Z (over 7 years ago)
- Last Synced: 2025-01-23T22:24:48.600Z (over 1 year ago)
- Language: C++
- Size: 17.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RegexGenerator
A C++ Regex Generator. Build regexes as if you were writing them in English.
Example usage:
```cpp
mvg::regex::regex_generator generator;
using mvg::regex::regex_generator;
auto regex = generator.create_regex()
.then_match(regex_generator::match_range('a', 'z'))
.then_match(regex_generator::match_string("XXX"))
.then_match(regex_generator::match_space())
.then_match(regex_generator::match_group(
generator.create_regex()
.then_match(regex_generator::match_string("Hello"))
.then_match(regex_generator::match_space())))
.then_match(regex_generator::match_any_of("abcdef"))
.then_match(regex_generator::match_none_of("qreoi"))
.then_match(regex_generator::match_zero_or_more(
regex_generator::match_range('a', 'z')));
std::regex regex_obj(regex.str());
```