need to encode { and } in regex