Missed optional switch in regex