To specify a maximum number of occurrences, use 0 as the lower bound.
/de{0,3}f/ matches d, followed by no more than three es, followed by f.