This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-15. For the latest, interactive version please visit https://mariadb.com/kb/.

Replace multiple character

How to replace multiple characters in a Textstring ececuting one select? Replace is just replacing on character during a select.

Answer Answered by Ian Gilfillan in this comment.

You don't specify exactly what you mean, but nested REPLACE statements, for example

SELECT REPLACE(REPLACE('xxx.mcriadb.org', 'x', 'w'),'c','a');
+-------------------------------------------------------+
| REPLACE(REPLACE('xxx.mcriadb.org', 'x', 'w'),'c','a') |
+-------------------------------------------------------+
| www.mariadb.org                                       |
+-------------------------------------------------------+

or regular expressions?

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.