Google has updated the help document for the performance report within Google Search Console to say that you are able to use regular expressions to filter the report results.
According to Google, “If you choose the Custom (regex) filter, you can filter by a regular expression (a wildcard match) for the selected item. You can use regular expression, or regex, filters for page URLs and user queries. The RE2 syntax is used.”
Although Regex is used quite often by developers, RE2 is the same regex syntax Google Analytics users are accustomed to using for querying data. Although Regex can be powerful and fast when filtering data and replacing data, it can be a bit tricky to get right. Regular expressions is a sequence of characters that define a search pattern. These types of patterns are typically used by string searching algorithms for “find” or “find and replace” operations on strings, or for input validation.
Google listed these bullets in the help document:
- The default matching is “partial match”, which means that your regular expression can match anywhere in the target string unless you use ^ or $ to require matching from the start or end of the string, respectively.
- Default matching is case-sensitive. You can specify “(?i)” at the beginning of your regular expression string for case-insensitive matches. Example: (?i)https
- Invalid regular expression syntax will return no matches.
- Regular expression matching is tricky; try out your expression on a live testing tool, or read the full RE2 syntax guide
There is even some common ways to uses this that Google has listed in the help document:
Right now, it’s unclear when this will go live.