---
title: "REGEXEXTRACT in Google Sheets: syntax and examples | PracticeExcel"
description: "How to use REGEXEXTRACT in Google Sheets: pull numbers, domains and codes out of text with one pattern."
canonical_url: "https://practiceexcelonline.com/sheets/functions/regexextract"
locale: en
meta:
  "og:description": "How to use REGEXEXTRACT in Google Sheets: pull numbers, domains and codes out of text with one pattern."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~UkVHRVhFWFRSQUNUIGluIEdvb2dsZSBTaGVldHM6IHN5bnRheCBhbmQgZXhhbXBsZXM%2Cdescription_~SG93IHRvIHVzZSBSRUdFWEVYVFJBQ1QgaW4gR29vZ2xlIFNoZWV0czogcHVsbCBudW1iZXJzLCBkb21haW5zIGFuZCBjb2RlcyBvdXQgb2YgdGV4dCB3aXRoIG9uZSBwYXR0ZXJuLg%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~UkVHRVhFWFRSQUNUKHRleHQsIHJlZ3VsYXJfZXhwcmVzc2lvbik%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL3JlZ2V4ZXh0cmFjdCI%2Cs__ANN2igsBdANxedm.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "REGEXEXTRACT in Google Sheets: syntax and examples | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~UkVHRVhFWFRSQUNUIGluIEdvb2dsZSBTaGVldHM6IHN5bnRheCBhbmQgZXhhbXBsZXM%2Cdescription_~SG93IHRvIHVzZSBSRUdFWEVYVFJBQ1QgaW4gR29vZ2xlIFNoZWV0czogcHVsbCBudW1iZXJzLCBkb21haW5zIGFuZCBjb2RlcyBvdXQgb2YgdGV4dCB3aXRoIG9uZSBwYXR0ZXJuLg%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~UkVHRVhFWFRSQUNUKHRleHQsIHJlZ3VsYXJfZXhwcmVzc2lvbik%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL3JlZ2V4ZXh0cmFjdCI%2Cs__ANN2igsBdANxedm.png"
---

> Index of every page on this site: [llms.txt](https://practiceexcelonline.com/llms.txt)

# **REGEXEXTRACT in Google Sheets**

Returns the part of a text that matches a pattern (a regular expression).

=

REGEXEXTRACT(

## **Syntax**

```
REGEXEXTRACT(text, regular_expression)
```

<dl><dt>**text **</dt>
<dd>The text to search. It must be text; a number gives #VALUE!.</dd>
<dt>**regular_expression **</dt>
<dd>The pattern in quotes, such as "\d+" for one or more digits.</dd></dl>

## **Examples**

C1`=REGEXEXTRACT(<sup>1</sup>A2,<sup>2</sup>"\d+")`

|  | A | B | C |
| --- | --- | --- | --- |
| 1 | Note |  | **1001** |
| 2 | Order 1001 shipped |  | |

**In plain words:** Pull <sup>2</sup>the first run of digits out of <sup>1</sup>the note in A2.

C1=REGEXEXTRACT(A2,"@(.+)$")

|  | A | B | C |
| --- | --- | --- | --- |
| 1 | Email |  | **example.com** |
| 2 | ann@example.com |  | |

## **Practice REGEXEXTRACT**

- [**1****Pull out a number with REGEXEXTRACT**→](https://practiceexcelonline.com/sheets/practice/regex/regexextract-number)

## **Related functions**

- [**REGEXMATCH**](https://practiceexcelonline.com/sheets/functions/regexmatch)
- [**REGEXREPLACE**](https://practiceexcelonline.com/sheets/functions/regexreplace)
- [**MID**](https://practiceexcelonline.com/functions/mid)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://practiceexcelonline.com/#identity","@type":"Organization","name":"PracticeExcel","url":"https://practiceexcelonline.com/","logo":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/#website","@type":"WebSite","inLanguage":"en-US","name":"PracticeExcel","url":"https://practiceexcelonline.com/","alternateName":["Practice Excel Online","PracticeExcelOnline.com"],"publisher":{"@id":"https://practiceexcelonline.com/#identity"},"workTranslation":{"@id":"https://excelopgaver.dk/#website"}},{"@id":"https://practiceexcelonline.com/sheets/functions/regexextract#webpage","@type":"WebPage","description":"How to use REGEXEXTRACT in Google Sheets: pull numbers, domains and codes out of text with one pattern.","name":"REGEXEXTRACT in Google Sheets: syntax and examples","url":"https://practiceexcelonline.com/sheets/functions/regexextract","breadcrumb":{"@id":"https://practiceexcelonline.com/sheets/functions/regexextract#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/sheets/functions/regexextract"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/sheets/functions/regexextract#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Google Sheets practice exercises","item":"https://practiceexcelonline.com/sheets","position":2},{"@type":"ListItem","name":"REGEXEXTRACT in Google Sheets: syntax and examples","position":3}]},{"@id":"https://practiceexcelonline.com/sheets/functions/regexextract#article","description":"How to use REGEXEXTRACT in Google Sheets: pull numbers, domains and codes out of text with one pattern.","headline":"REGEXEXTRACT in Google Sheets: syntax and examples","inLanguage":"en-US","thumbnailUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~UkVHRVhFWFRSQUNUIGluIEdvb2dsZSBTaGVldHM6IHN5bnRheCBhbmQgZXhhbXBsZXM%2Cdescription_~SG93IHRvIHVzZSBSRUdFWEVYVFJBQ1QgaW4gR29vZ2xlIFNoZWV0czogcHVsbCBudW1iZXJzLCBkb21haW5zIGFuZCBjb2RlcyBvdXQgb2YgdGV4dCB3aXRoIG9uZSBwYXR0ZXJuLg%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~UkVHRVhFWFRSQUNUKHRleHQsIHJlZ3VsYXJfZXhwcmVzc2lvbik%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL3JlZ2V4ZXh0cmFjdCI%2Cs__ANN2igsBdANxedm.png","@type":["Article","TechArticle"],"author":{"@id":"https://practiceexcelonline.com/#identity"},"image":{"@id":"https://practiceexcelonline.com/#/schema/image/1"},"isPartOf":{"@id":"https://practiceexcelonline.com/sheets/functions/regexextract#webpage"},"mainEntityOfPage":{"@id":"https://practiceexcelonline.com/sheets/functions/regexextract#webpage"},"publisher":{"@id":"https://practiceexcelonline.com/#identity"}},{"@id":"https://practiceexcelonline.com/#logo","@type":"ImageObject","caption":"PracticeExcel","contentUrl":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png"},{"@id":"https://practiceexcelonline.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~UkVHRVhFWFRSQUNUIGluIEdvb2dsZSBTaGVldHM6IHN5bnRheCBhbmQgZXhhbXBsZXM%2Cdescription_~SG93IHRvIHVzZSBSRUdFWEVYVFJBQ1QgaW4gR29vZ2xlIFNoZWV0czogcHVsbCBudW1iZXJzLCBkb21haW5zIGFuZCBjb2RlcyBvdXQgb2YgdGV4dCB3aXRoIG9uZSBwYXR0ZXJuLg%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~UkVHRVhFWFRSQUNUKHRleHQsIHJlZ3VsYXJfZXhwcmVzc2lvbik%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL3JlZ2V4ZXh0cmFjdCI%2Cs__ANN2igsBdANxedm.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~UkVHRVhFWFRSQUNUIGluIEdvb2dsZSBTaGVldHM6IHN5bnRheCBhbmQgZXhhbXBsZXM%2Cdescription_~SG93IHRvIHVzZSBSRUdFWEVYVFJBQ1QgaW4gR29vZ2xlIFNoZWV0czogcHVsbCBudW1iZXJzLCBkb21haW5zIGFuZCBjb2RlcyBvdXQgb2YgdGV4dCB3aXRoIG9uZSBwYXR0ZXJuLg%2Ceyebrow_Google%2BSheets%2Bpractice%2Bexercises%2Csite_practiceexcel%2Ccode_~UkVHRVhFWFRSQUNUKHRleHQsIHJlZ3VsYXJfZXhwcmVzc2lvbik%2Cp_Ii9zaGVldHMvZnVuY3Rpb25zL3JlZ2V4ZXh0cmFjdCI%2Cs__ANN2igsBdANxedm.png"}]}
```

## Sitemap

See the full [sitemap](https://practiceexcelonline.com/sitemap.md) for all pages.
