People either love or hate regular expressions, so if you love them – you are going to love what is coming to Google Search Console’s Performance report. Google is adding the ability to use regular expressions in that report according to an updated help document.
Kenichi Suzuki spotted this first and notified me on Twitter of this, he said “Search Performance Report now enables you to use regular expression filters!”
A regular expression (some call it regex) is a sequence of characters that define a search pattern. Usually such patterns are used by string searching algorithms for “find” or “find and replace” operations on strings, or for input validation.
Google explained how it can be use in the performance report:
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 filters for page URLs and user queries. The RE2 syntax is used.
- 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
Google even gave you examples of common regular expressions you can use
over here for this report.
It does not seem live yet, at least not for me, but it seems to be coming soon:
I can’t wait for the irregular expressions to launch!
— 🍌 John 🍌 (@JohnMu) July 6, 2020
Yes, regex can be super confusing and complex to use, but as Gary Illyes from Google said, you cannot do harm to your site with it in the performance report:
Eh, at least with this you can’t shoot yourself in the foot. At least not directly
— Gary 鯨理／경리 Illyes (@methode) July 6, 2020
Forum discussion at Twitter.