Invoice ID
=REGEXEXTRACT(A2, "INV-(\d+)") pulls digits after INV- from a memo field.
REGEXEXTRACT returns the portion of text that matches a regular expression, often using capture groups to pull IDs, domains, or codes from longer strings. It replaces manual LEFT/RIGHT/MID chains when patterns repeat.
Use REGEXEXTRACT to parse invoice numbers from descriptions, domains from URLs, or area codes from phone strings.
Skip REGEXEXTRACT when SPLIT on a reliable delimiter is enough. Simpler formulas age better for junior editors.
Identify a stable pattern with parentheses around the part you want to capture.
Write =REGEXEXTRACT(text, "pattern") returning the first capture group by default.
Apply down a column or with MAP for bulk parsing.
Combine with IFERROR when some cells lack a match.
TRIM and CLEAN source text before regex when imports add junk characters.
Document the pattern on a Settings tab for future you.
=REGEXEXTRACT(A2, "INV-(\d+)") pulls digits after INV- from a memo field.
=REGEXEXTRACT(B2, "https?://([^/]+)") returns hostname from a full URL string.
=REGEXEXTRACT(C2, "\b(\d{5})\b") grabs five-digit ZIP when present.
Build this without starting from a blank cell
Use a Better Sheets tool for REGEXEXTRACT, then watch a walkthrough when you want the full pattern.
Watch how REGEXEXTRACT works
Guides that explain REGEXEXTRACT in more depth.
Every school year thousands of students and teachers’ data were being added to the school database. As someone who was always given the task to narrow down lots of information after the school enrollment, validating students’ data manually is very exhausting. Take this as an example, when you ask students to include the phone numbers of their emergency contact person, there are some instances wherein the declared numbers were invalid due to human error. And the assigned personnel during enr...
Read post →Extract url from hyperlink google sheets.Skip the Command K. This Google Sheet tutorial will make it easier for you to extract URLS from Google Sheets.
Read post →REGEXREPLACE finds text matching a regex pattern and replaces it with new text. Strip non-digits from phones, normalize spaces, or remove tags from HTML snippets in bulk without one-off find-and-replace menus.
Read guide →REGEXMATCH returns TRUE or FALSE when text matches a regular expression pattern. Use it in FILTER, IF, and COUNTIF to validate emails, extract structure flags, or flag messy imports before they break downstream reports.
Read guide →SPLIT divides one text cell into multiple cells spilled across columns using a delimiter such as comma, space, or custom string. It is the formula version of Text to columns for live data like tags, full names, or combined codes.
Read guide →TEXTJOIN merges many text values into one string with a delimiter between them. The ignore_empty argument skips blanks so you do not get double commas. It builds display labels, CSV-like rows, and summary lines from wide tables.
Read guide →Done reading about REGEXEXTRACT?
Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.