Filtering with a regular expression
We can use regular expressions to exclude Van Tires and its child elements.
- In Design mode, click the Product hyperblock so that the List Designer is enabled.
-
Open the Filter pane of the List Designer and click New Filter.
The Filter pane displays Caption less than.
- Click Caption less than.
- From the Filter By list in the Filter Settings area at the bottom of the pane, select Caption.
- From the Filter Type list, select Regular Expression.
- From the Condition list, select Does not equal.
- Click in the Regular Expression field. Click the browse button that is displayed.
-
In the right-hand pane of the Edit
Formula dialog box, specify Va
and click OK.
If you specify only V then the SUV (4x4) Tires element is excluded from the report because its caption includes the letter V.
-
Click
Apply changes to the
list.
In View mode, the Van Tires element is not displayed, but its child elements are displayed. We can add a second regular expression to exclude the child elements.
- In the filter pane, click the New Filter icon.
-
Click Caption
less than and define a second regular expression. This time, specify
C[23] in the Edit
Formula dialog box.
If you specify only C, then the Cold Season element in the Special Offers product group is also excluded. Specifying C[23] is the minimum required to exclude the C2001 Citycruiser, C2002 Citynet, and C3000 Loader tires, without excluding any tires in other product groups.
In View mode, the Van Tires element and its children are excluded. But, in this
report, there is a better solution.