Hello,
The last stage of the backreferences extension (#xe5) has a case that test greediness:
echo -n "abc-def is abc-def, not efg, abc, or def" | ./your_program.sh -E "(([abc]+)-([def]+)) is \1, not ([^xyz]+), \2, or \3"
([^xyz]+)
matches the rest of the string efg...
. To pass the test, you need to take into account greediness and backtracking. This behavior is never tested before. I think this is not a good way to introduce it and would be better in a separated extension.