THE USEFUL IDEA

Keep the expression alongside positive and negative cases; check selection before interpreting its metrics.

Write the intended set first

A fictional catalog has two models named Mesa.A and Mesa.B. We want queries consisting of exactly one of those names, without additional words. The rule does not automatically include spelling variants, plurals or phrases expressing purchase intent.

Record the property, period, search type and Queries dimension. This exercise constructs a text rule; it contains no real export and does not establish that those queries exist in any property.

Separate literal text from operators

Google documents that the custom filter uses RE2, with partial matching and case-insensitive matching by default. Consequently, mesa.a can match part of a string, and its dot represents any single character.

To require a written dot, use [.] in this exercise. To cover the entire string, place ^ at the beginning and $ at the end. Thus, ^mesa[.]a$ accepts the complete name but rejects a phrase containing it in the middle. Do not add spaces around the pattern for presentation: they can also become part of the search.

Put alternatives inside the same boundary

The exercise’s pattern is ^(mesa[.]a|mesa[.]b)$. Parentheses group both alternatives; the vertical bar means either one. Anchors remain outside to apply to the entire group.

Mesa.A, mesa.a and MESA.B should match under the default configuration. MesaXa, comprar Mesa.A and Mesa.B grande should not. The first checks the literal dot; the other two check that the name occupies the entire string. A different result requires reviewing pattern and settings before explaining the report.

Check the filter in the correct tool

In the Performance report, add a Queries filter, choose Custom (regex), then Matches regex. Paste the expression without surrounding quotation marks. Keep other filters belonging to the scope and inspect recognizable rows.

Do not assume another expression editor shares these defaults. A test in another language may change case sensitivity or matching scope. To exclude the pattern, use the available nonmatching option and check the expected examples again.

Save a reviewable rule

Record purpose, exact expression, inclusion or exclusion mode, test cases and date. If you decide to include phrases such as comprar Mesa.A, change the definition first and then the expression; do not broaden the pattern merely to obtain more rows.

Text matching establishes neither intent nor complete coverage. A missing row can reflect report limitations rather than a pattern error. Preserve the logical test separately from interpretation of observed metrics.

SOURCES & EDITORIAL NOTES

Follow the evidence.

  1. Google Search Console: advanced filtering and comparison ↗
  2. Google RE2: syntax reference ↗

Sources checked November 23, 2026. The exercise scenarios and figures are fictional. Our editorial standards.

Good ideas are better when they travel.