Text
Remove special characters from text (and generate clean URL slugs)
Strip punctuation symbols in a single pass or convert product titles into hyphenated URL slugs using TEXTSPLIT array delimiters and TEXTJOIN.
Split on an explicit delimiter list
The shown delimiter array handles eight selected characters: #, /, (, ), _, ordinary space, comma, and colon.
Passing an inline delimiter array {"#","/","(",")","_"," ",",",":"} to TEXTSPLIT breaks the text at every unwanted character simultaneously. Rejoining non-empty tokens with TEXTJOIN("", TRUE, ...) strips symbols completely, while TEXTJOIN("-", TRUE, ...) with LOWER builds SEO-friendly URL slugs.
| RawInput (A) | Selected Symbols Removed | Hyphenated URL Slug |
|---|---|---|
| SKU#48/20 (Rev_B) | SKU4820RevB | sku-48-20-rev-b |
| Pro Plan: Annual, Tier 1 | ProPlanAnnualTier1 | pro-plan-annual-tier-1 |
URL slug and symbol-stripping formulas
TEXTJOIN's second argument (ignore_empty = TRUE) collapses adjacent punctuation like ": " or ") " into a single hyphen for these delimiters.
=LOWER(TEXTJOIN("-", TRUE, TEXTSPLIT(A2, {"#","/","(",")","_"," ",",",":"})))Strip symbols without separators
Use "" as the TEXTJOIN delimiter to compact part numbers for matching.
=TEXTJOIN("", TRUE, TEXTSPLIT(A2, {"#","/","(",")","_"," ",",",":"}))Inputs and interpretation
This is not a complete URL slug validator. Characters absent from the delimiter list, including existing hyphens, exclamation marks and Unicode characters, remain. Different inputs can collapse to the same slug. Choose a normalization/encoding policy, validate allowed characters and enforce uniqueness before using generated strings as routes.
Try the example
Use the original values or change them to test your understanding.