logo
excelfunctions.org
bookmarks

REGEXREPLACE

Replaces strings within the provided text that matches the pattern with replacement.

TextModern Excel FunctionsText Processing

What it does

Replaces text matching a regex pattern.

Syntax

REGEXREPLACE(text, pattern, replacement, [occurrence], [case_sensitivity])

Arguments

  • text(text) β€” Source text.
  • pattern(text) β€” Regex pattern.
  • replacement(text) β€” New text.

Examples

Remove Digits

Remove numbers.

FORMULA
=REGEXREPLACE("Item 123", "\d+", "")
RESULT
Item
SAMPLE DATA
A
1Text
2Item 123