You've used your 2 free formulas on this tool

Your last result is still on screen and copied. You only need membership to keep generating. Members get unlimited formula, sparkline, regexmatch, regexreplace, and conditional formatting generators, plus courses and tutorials when you’re stuck.

Free generations 2 / 2
  • Unlimited Formula, Sparkline, RegexMatch, RegexReplace, and Conditional Formatting generators
  • Step-by-step Google Sheets courses and tutorials
  • New tools and templates as they ship

Google Sheets tool

REGEXREPLACE formula generator

Describe what you want to change, paste an example string, and get a ready-to-paste =REGEXREPLACE() formula for your sheet.

Three fields. One click. Copy the formula straight into your cell.

Build your formula

Plain language is fine—the more specific, the better the pattern.

Blank defaults to A1.

2 free generations · Members generate without limits

Output

=REGEXREPLACE(A1, "…", "…")

Recipe library

REGEXREPLACE examples for Google Sheets

Real patterns for CRM cleanup, SEO slugs, YouTube IDs, and scraped HTML. Load any card into the generator at the top of this page, or copy the formula directly into your sheet.

CRM CRM imports contact databases

Clean Phone Numbers for CRM Imports

People enter phone numbers in inconsistent formats.

Before (cell A1)

  • +1 (555) 123-4567
  • 555.123.4567
  • 555-123-4567 ext 89

After

  • 15551234567
  • 5551234567
  • 555123456789

Formula

=REGEXREPLACE(A1,"[^0-9]","")
  • clean phone numbers google sheets
  • format phone numbers spreadsheet
  • remove symbols from phone numbers
YouTube thumbnail generators YouTube automation

Extract YouTube Video IDs from URLs

Extract video IDs from different YouTube URL formats.

Before (cell A1)

  • https://www.youtube.com/watch?v=dQw4w9WgXcQ
  • https://youtu.be/dQw4w9WgXcQ

After

  • dQw4w9WgXcQ

Formula

=REGEXREPLACE(A1,".*(?:v=|be/)([a-zA-Z0-9_-]{11}).*","$1")
  • youtube id extractor
  • extract youtube video id
  • youtube regex google sheets
Web Scraping SEO tools web scraping

Remove HTML Tags from Scraped Content

Remove HTML tags from scraped website content.

Before (cell A1)

  • <h1>Best Coffee Shops</h1><p>Bali has amazing cafes.</p>

After

  • Best Coffee ShopsBali has amazing cafes.

Formula

=REGEXREPLACE(A1,"<[^>]+>","")
  • remove html tags google sheets
  • clean scraped content
  • html cleanup spreadsheet
SEO blog publishing SEO optimization

Convert Titles into SEO-Friendly URL Slugs

Turn messy titles into clean URL slugs.

Before (cell A1)

  • 10 Best Cafes in Bali

After

  • 10-best-cafes-in-bali

Formula

=REGEXREPLACE(LOWER(REGEXREPLACE(A1,"[^a-zA-Z0-9]+","-")),"(^-+|-+$)","")
  • url slug generator
  • seo slug google sheets
  • convert title to url
Data Cleaning CSV exports database cleanup

Remove Emojis from Imported Data

Strip emojis from text before importing into systems.

Before (cell A1)

  • 🔥 HUGE SALE TODAY 🚀

After

  • HUGE SALE TODAY

Formula

=REGEXREPLACE(A1,"[^\x00-\x7F]","")
  • remove emojis spreadsheet
  • strip unicode text
  • emoji cleaner google sheets
Lead Generation lead generation contact extraction

Extract Email Addresses from Text

Find and extract email addresses from text.

This pattern uses REGEXEXTRACT; load it in the generator to adapt for your sheet.

Before (cell A1)

  • Contact us at support@bettersheets.co for help.

After

  • support@bettersheets.co

Formula

=REGEXEXTRACT(A1,"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}")
  • extract email addresses spreadsheet
  • regex email extraction
  • scrape emails google sheets
Data Cleaning name cleanup CSV cleanup

Remove Duplicate Spaces from Text

Fix messy spacing from copied or imported text.

Before (cell A1)

  • Andrew Kamphey

After

  • Andrew Kamphey

Formula

=TRIM(REGEXREPLACE(A1,"\s+"," "))
  • remove extra spaces google sheets
  • clean text spacing
  • trim spaces spreadsheet
SEO backlink audits SEO analysis

Extract Domain Names from URLs

Pull only the domain name from full URLs.

Before (cell A1)

  • https://www.bettersheets.co/tutorials/google-sheets

After

  • bettersheets.co

Formula

=REGEXREPLACE(A1,"https?://(www\.)?([^/]+).*","$2")
  • extract domain from url
  • domain parser spreadsheet
  • seo url analysis
Automation prompt engineering CSV prep

Turn Line Breaks into Comma-Separated Lists

Convert multi-line text into comma-separated values.

Before (cell A1)

  • Apple Banana Orange

After

  • Apple, Banana, Orange

Formula

=REGEXREPLACE(A1,"\n",", ")
  • replace line breaks google sheets
  • convert multiline to csv
  • text list formatter
SEO SEO cleanup canonical URLs

Strip Tracking Parameters from URLs

Remove UTM tracking parameters from URLs.

Before (cell A1)

  • https://example.com/page?utm_source=twitter&utm_campaign=sale

After

  • https://example.com/page

Formula

=REGEXREPLACE(A1,"\?.*","")
  • remove utm parameters
  • clean urls spreadsheet
  • strip query strings
Social Media social analytics trend tracking

Extract Hashtags from Social Posts

Pull hashtags from social media content.

Before (cell A1)

  • New video today! #GoogleSheets #Automation #NoCode

After

  • #GoogleSheets #Automation #NoCode

Formula

=REGEXREPLACE(A1,".*?(#\w+(?:\s+#\w+)*).*","$1")
  • extract hashtags spreadsheet
  • social media regex
  • hashtag parser
Ecommerce inventory systems warehouse exports

Normalize Product SKUs

Clean and standardize messy SKU codes.

Before (cell A1)

  • SKU: ab-123_xy!

After

  • SKUAB123XY

Formula

=UPPER(REGEXREPLACE(A1,"[^A-Za-z0-9]",""))
  • normalize sku spreadsheet
  • clean product codes
  • ecommerce data cleanup
AI AI publishing markdown cleanup

Clean AI Output Before Publishing

Replace AI-generated bullet symbols with standard formatting.

Before (cell A1)

  • Here's your answer: • Item one • Item two • Item three

After

  • Here's your answer: - Item one - Item two - Item three

Formula

=REGEXREPLACE(A1,"[•]+","-")
  • clean ai output
  • format chatgpt text
  • normalize ai formatting

Need unlimited generations across every tool?

Upgrade once, skip usage limits, and move from idea to final formula without stopping.

Unlock unlimited generations

Watch REGEXREPLACE in action

Real walkthroughs: cleaning messy strings, stripping HTML, swapping line breaks, and more.

Browse tutorials

About the formula

REGEXREPLACE(text, regular_expression, replacement) matches a pattern in text and swaps it for something new—ideal when find-and-replace is not enough.

Syntax, examples, and member tutorials live in the formula directory.

Open reference

Google Sheets Tools

Discover Google Sheets tools for anyone building spreadsheets, automations, and data workflows.