remove patterns and strings from urls #1898