Escape regex characters when adding to name filter.