Escape curly bracket in regex pattern to address warning