Filtering with a regular expression

We can use regular expressions to exclude Van Tires and its child elements.

  1. In Design mode, click the Product hyperblock so that the List Designer is enabled.
  2. Open the Filter pane of the List Designer and click New Filter.
    The Filter pane displays Caption less than.
  3. Click Caption less than.
  4. From the Filter By list in the Filter Settings area at the bottom of the pane, select Caption.
  5. From the Filter Type list, select Regular Expression.
  6. From the Condition list, select Does not equal.
  7. Click in the Regular Expression field. Click the browse button that is displayed.
  8. 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.
  9. 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.
  10. In the filter pane, click the New Filter icon.
  11. 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.