Search-and-replace filters

Use Search-and-Replace Filters to replace a matched expression with another string. They require a filter field, an expression to search for, and a replace expression. The search expression is a regular expression, while the replace expression is any text that you wish to use to replace the original text.

For example, you can use Search-and-Replace filters to remove a leading directory from your reports. To do so, select the Request URI field and enter ^/directory/ in the Search String field. The Replace String would then be /.

Another use would be to replace category ID numbers with descriptive words in the query string of a request. For example, suppose that samples of the requested file with attached queries looks like:

/docs/document.cgi?id=1000
/docs/document.cgi?id=2000

Using the search and replace filter, you could convert the 1000 or 2000 IDs to readable equivalents. For example, 1000 could be changed to books, and 2000 changed to magazines. This would make your reports more useful to people who are not familiar with the individual ID codes.

For an overview of filters, read About view filters.