remove patterns and strings from urls #1898

Closes #1898.