Regular expressions

snipexp: does not change which sites are found: each result's snippet becomes what your expression captures, instead of the code around the match. That is how a list of sites becomes a list of publisher ids, phone numbers or plugin names.

To pull values out of many sites at once - ids, emails, phone numbers - the more convenient tool is extraction from a cluster: it goes through every site of the cluster and gives one CSV row per site. snipexp: is for a quick look at what the search itself finds.

The expression is a PCRE pattern with its delimiters - usually |, which a query rarely contains - and at least one capturing group: what it captures is what you get, and without one the snippet is empty, the usual reason for a blank column. Flags follow the closing delimiter: i makes it case-insensitive.

If the expression itself needs | - alternatives such as (click|links) - put it in slashes instead: snipexp:/(click|links)-(\d+)/. An expression that is not accepted is not used: a line above the results says why, and the snippets show the code around the match.

Phone numbers of pizzerias in Italy

"href=\"tel" site:it pizza snipexp:|\"tel\:([^\"]+)\"|

Snippets are what the CSV+snippets download carries and what snippets=1 returns from the API. A search with snippets also spends one from a smaller daily snippet limit inside your search allowance - see quotas and rate limits.

Next Country domains