optimize the regex and implement vacation range