Fix parsing {} in regex