Regex to segment GSC queries by length
HT to Ziggy Shtrosberg (opens in a new tab) for this helpful tip: use a regex to segment GSC queries into buckets based on length. The really long ones are more likely to be from AI search.
Modify these examples as needed:
- All queries with 5 to 8 words:
◦ ^([^" "]*\s){4,7}[^" "]*$
- All queries with 20 or more words:
◦ ^([^" "]*\s){19,}[^" "]*$

