remove redundant escape characters in regexps
allow ~ in urls, required for Filters in containers