This is a solution to the "Build Your Own grep" Challenge in Rust. It handles a lot of pattern presented in the challenge including capture groups, wildcards, anchors, character groups(\d, \w) etc.
Run Tests:
make testRun program:
chmod +x your_program.sh
echo -e "grep 101 is doing grep 101 times, and again grep 101 times\nabc-def is abc-def, not efg, abc, or def" | ./your_program.sh -E '(([abc]+)-([def]+)) is \1, not ([^xyz]+), \2, or \3'
Output:
abc-def is abc-def, not efg, abc, or def