Bug #29781 Adding in Pattern Replace (RegExp) for MySQL Engine
Submitted: 13 Jul 2007 2:24 Modified: 13 Jul 2007 6:51
Reporter: David Boccabella Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:5.0.41 OS:Any
Assigned to: CPU Architecture:Any
Tags: REGEXP, REPLACE
Triage: D5 (Feature request)

[13 Jul 2007 2:24] David Boccabella
Description:
Many databases have a regexp replace function that you can use to do something like strip out bad characters. i,e, remove spaces, brackets, and dashes from a phone number.

It would be very handy is this was within MySQL so you can do translations during a Update or a Insert

Many mny thanks

Dave

How to repeat:

select regexp(client_ref,'[/W]') from orders

This would be a possible use
[13 Jul 2007 6:51] Valeriy Kravchuk
Thank you for a reasonable feature request.
[21 May 2008 4:40] Dongjoon Hyun
I really want this features!
[3 Dec 2014 13:54] Vojtech Kurka
A workaround: https://github.com/hholzgra/mysql-udf-regexp/tree/master/regexp
[8 Oct 2015 8:32] Lukas Eder
Another workaround that doesn't depend on any extensions would be to use REPLACE() with individual characters:
http://stackoverflow.com/q/33009622/521799

But it's rather tedious and not suitable for non-trivial regular expressions.

Would be great if this simple but powerful feature was available in MySQL as well.