# Ticket #6074 (closed enhancement: fixed)

Opened 4 years ago

## Add way to exclude sets of pages

Reported by: Assigned to: pickscrape@gmail.com martin_s normal ListOfWikiPagesMacro normal 0.11

### Description

Some way to exclude ranges of pages based on some hierarchical base would be nice.

Just an idea. :)

## Change History

### 10/29/09 23:30:44 changed by martin_s

• status changed from new to assigned.

Good idea. As soon I find time.

### 10/30/09 00:11:59 changed by martin_s

Can be done with SQL, something like ... AND name NOT LIKE 'pattern' . I would be happy to receive patches. :-)

### 10/30/09 15:13:10 changed by pickscrape

The thing that complicates this for me is that I would probably want to be able to supply multiple filters. I've had a quick look at the code but I don't know how trac macro handling of such things would work...

From the SQL perspective that would probably mean that the query builder would need to be able to handle an arbitrary number of AND name NOT LIKE 'pattern' clauses.

### 10/30/09 18:00:25 changed by martin_s

• status changed from assigned to closed.
• resolution set to fixed.

(In [6955]) Added exclude=pattern option to ListOfWikiPages. This closes #6074.

### 10/30/09 18:07:07 changed by martin_s

Use as following:

## Wildcards

• * matches everything (translated to % in SQL)
• ? matches a single character (translated to _ in SQL)

Care is taken to automatically escape normal % and _. Wildcards can be escaped using double backslashes '\\', e.g. \\* stands for a normal non-wildcard '*'.

The ListOfWikiPagesMacro now uses the AdvParseArgsPlugin.

## Example

[[ListOfWikiPages(...,exclude=Trac*,exclude=tests/*,exclude=A?B)]]


This will exclude all wikis starting with Trac and tests/ as well as all three-character wikis which start with A and end with B.

### 10/30/09 18:19:54 changed by pickscrape

Absolutely fantastic: thanks for turning this around so quickly.

This makes our "RustyPages" page 100% useful now: thanks a lot!

### 10/30/09 18:32:29 changed by martin_s

Just added exclude support for ListChangesBy and made a small bugfix: [6956]