Google Sheets formula builder

REGEXEXTRACT Formula Builder

Create a Google Sheets REGEXEXTRACT formula from a source cell and a predefined or custom regex pattern.

Builder inputs

Choose a pattern type or enter a custom regular expression.

Formula is valid and ready to copy.

Google Sheets formula
=REGEXEXTRACT(A2, "^(?:https?:\/\/)?(?:www\.)?([^\/\?#]+)")
Explanation
REGEXEXTRACT is a Google Sheets function. In Excel, use TEXTAFTER, TEXTBEFORE, or Power Query for many text extraction jobs.

How this formula works

  • REGEXEXTRACT returns the first captured group from the pattern.
  • The domain pattern ignores http, https, and www prefixes.
  • Custom patterns are inserted directly, with double quotes escaped for formula safety.

Sample data

URLResult
https://www.example.com/pricingexample.com
https://docs.google.com/spreadsheetsdocs.google.com
https://support.example.com/examplessupport.example.com

Common mistakes

  • Patterns need a capturing group when you want only part of the text.
  • Backslashes must be preserved when writing custom regex patterns.
  • Excel does not have REGEXEXTRACT in older desktop builds.

Related formulas

FAQ

Are these formulas generated with AI?

No. The builder uses deterministic TypeScript functions in the browser and does not call any AI API.

Do I need to upload my spreadsheet?

No. Enter ranges and criteria manually. The site does not upload, store, or process spreadsheet files.

Can I copy the generated formula?

Yes. Each output includes a copy button so you can paste the formula into Excel or Google Sheets.