redone: regex: add special case for empty patterns