# Remove classes of characters

Shape / columns

A variant of [Clean up text](https://meridian.online/operations/clean-up-text).

Remove every letter, digit, punctuation mark, symbol or space from text.

Page: <https://meridian.online/operations/clean-up-text/remove-characters>

## Status

Runs as a SQL step.

arcform carries it as a `sql:` step today.

## The DuckDB step

remove every digit, letter, punctuation mark, symbol or space

```sql
CREATE TEMP TABLE raw AS SELECT 'Ab-12 c_3!$+' AS s;
CREATE TEMP TABLE result AS
SELECT regexp_replace(s, '\pN', '', 'g') AS no_digits, regexp_replace(s, '\pL', '', 'g') AS no_letters,
       regexp_replace(s, '\pP', '', 'g') AS no_punctuation, regexp_replace(s, '\pS', '', 'g') AS no_symbols,
       regexp_replace(s, '\s', '', 'g') AS no_spaces FROM raw;
SELECT * FROM result;
SELECT CASE WHEN ((SELECT [no_digits, no_letters, no_punctuation, no_symbols, no_spaces] FROM result) = ['Ab- c_!$+', '-12 _3!$+', 'Ab12 c3$+', 'Ab-12 c_3!', 'Ab-12c_3!$+']) THEN 'as expected' ELSE error('digits, letters, punctuation, symbols and spaces were not each removed from Ab-12 c_3!$+') END AS verdict;
```

The statement builds its own data.

It needs nothing installed beyond DuckDB itself.

## What other tools call it

Meridian's classification; an independent blind rating agreed on 95.7% of 324 rows (variant, version 3).

- KNIME Analytics Platform: [`String Cleaner`](https://api.hub.knime.com/nodes/*wsgqS8W_d8XAAxX-?details=full) (read 2026-09-27)
- Tableau Prep: [`Remove All Spaces`](https://help.tableau.com/current/prep/en-us/prep_clean.htm) (read 2026-09-27)
- Tableau Prep: [`Remove Letters`](https://help.tableau.com/current/prep/en-us/prep_clean.htm) (read 2026-09-27)
- Tableau Prep: [`Remove Numbers`](https://help.tableau.com/current/prep/en-us/prep_clean.htm) (read 2026-09-27)
- Tableau Prep: [`Remove Punctuation`](https://help.tableau.com/current/prep/en-us/prep_clean.htm) (read 2026-09-27)
- Trifacta: [`Remove symbols in text`](https://help.alteryx.com/aac/en/trifacta-classic/reference/transformation-reference.html) (read 2026-09-27)
- Trifacta: [`Remove whitespace in text`](https://help.alteryx.com/aac/en/trifacta-classic/reference/transformation-reference.html) (read 2026-09-27)
