Question: I am attempting to clean up in a messy table consisting of words which are unnecessary.
The example below shows the typical content:

```
row1        |
-------------
text <12>   |
more [dada] |
(123) foo   |
la {55w} da |

```

Basically what i define as unnecessary content is all the words starting and ending with a particular symbol: `<...>`, `[...]`, `{...}` and `(...)`. Usually i would use the replace function, but since the data inside of the symbols are arbitrary it is not quite possible.

Is it possible to use some kind of RegEX in the REPLACE function?

**UPDATE**

Please take notice that the content wrapped inside the symbols can any letters and numbers, basically unpredictable.

Answer: 
Ok i see now !   

**use the replace like this** - see example(will clean everything from inside '()')

```
   mysql> CREATE TABLE tbl (
    ->   txt VARCHAR(255)
    -> );
Query OK, 0 rows affected (0.50 sec)
mysql> INSERT INTO tbl VALUES
    -> ('sometext (asdebtrw)'),
    -> ('some other text ( sd sdasddebtrw)'),
    -> ('somesdaftext ( (sd)( ))ebt rw)()'),
    -> ('sometext1'),
    -> ('sometext2'),
    -> ('sometext1 (replacethistext) anothertext1'),
    -> ('s'),
    -> ('w(sdf) rr')
    -> ;
Query OK, 8 rows affected (0.00 sec)
Records: 8  Duplicates: 0  Warnings: 0

mysql> select * from tbl;
+------------------------------------------+
| txt                                      |
+------------------------------------------+
| sometext (asdebtrw)                      |
| some other text ( sd sdasddebtrw)        |
| somesdaftext ( (sd)( ))ebt rw)()         |
| sometext1                                |
| sometext2                                |
| sometext1 (replacethistext) anothertext1 |
| s                                        |
| w(sdf) rr                                |
+------------------------------------------+
8 rows in set (0.00 sec)

mysql> UPDATE tbl
    -> SET    txt = REPLACE(txt, SUBSTRING(txt, LOCATE('(', txt), LENGTH(txt) - LOCATE(')', REVERSE(txt)) - LOCATE('(', txt) + 2), '')
    -> WHERE  txt LIKE '%(%)%';
Query OK, 5 rows affected (0.20 sec)
Rows matched: 5  Changed: 5  Warnings: 0

mysql> select * from tbl;
+-------------------------+
| txt                     |
+-------------------------+
| sometext                |
| some other text         |
| somesdaftext            |
| sometext1               |
| sometext2               |
| sometext1  anothertext1 |
| s                       |
| w rr                    |
+-------------------------+
8 rows in set (0.22 sec)

```
[regex\_replace](https://mariadb.com/kb/en/regexp_replace/) is your mate here:

```
SELECT REGEXP_REPLACE('ab12cd','[0-9]','') AS remove_digits;
-> abcd

```

Though it may be a [MariaDB](http://mariadb.com) enhancement.