> For such a case in unix, I'd make heavy use of what I've seen referred to as
> "intervalic" regular expressions (numeric ranges expressed in braces: "\{n,n\
> }" in simple and basic unix regular expressions, "{n,n}" in extended posix re
> gular expressions). But regexp(6) doesn't mention these, and I get errors fr
> om sam, awk, ed, et. al. when I try them.
Not as convenient but can't you transform your extended RE
into basic REs?
RE{0,n} == RE? RE{0,n-1}
RE{m,n} == RE RE{m-1,n-1}
