NacRE is a lightweight, NFA-based regular expression engine that supports a subset of Perl compatible regex (PCRE) syntax.
- Literals:
a,b,c, etc. - Escaped Characters:
\f,\n,\r,\t,\v - Wildcards:
.,\d,\D,\w,\W,\s,\S, - Anchors:
^,$,\b - Quantifiers:
*,+,?,{n},{n,},{n,m} - Alternation:
| - Grouping:
() - Character Classes:
[abc],[^abc],[a-z],[\d\D\w\W\s\S]
- Clone the repository:
git clone {this repo}
cd nacre- Build the project:
make release- Run the executable:
./nacre./nacre [OPTIONS] PATTERN INPUT_FILEThe default match mode is find the first match from the start of file to the end of the file.
-g: Global matching (find all matches)-m: Multiline matching (process input line by line).
./nacre -gm "a.*b" example.txtThis command matches all occurrences of the pattern a.*b in example.txt with global and multiline options enabled.