Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
REGEXREPLACE finds all occurrences within a text string that match a regular expression pattern and replaces them with a specified replacement string. It is a Google Sheets-only function used for advanced text cleaning — such as removing punctuation, stripping HTML tags, normalising whitespace, or masking sensitive data.
=SUBSTITUTE(SUBSTITUTE(A2,"!",""),"?","")=REGEXREPLACE(A2,"[^a-zA-Z0-9 ]","")Computed by a real spreadsheet engine on the sample data below.
| Raw Text | Cleaned |
| Hello, World! | Hello World |
| Price: $9.99 | Price 999 |
| Name (2024) | Name 2024 |
| test@email.com | testemailcom |
=SUBSTITUTE(SUBSTITUTE(A2,"!",""),"?","")→Hello, World
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Need a version for your data?
Try: “Remove all special characters from a column of product descriptions”
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: