MySQL - delete part of a row

I need to remove http://www., http://, https://www.and https://of the concatenated string and would like to know whether there is a better way than to use the REPLACE function. I assume RegEx, but I could not get it to work.

`out`= CONCAT(REPLACE( REPLACE( `PROGRAMNAME`, 'http://', '' ),'www.',''),'-', `NAME`
+3
source share
1 answer

There is a UDF package created to perform this type of operation with MySQL.

https://launchpad.net/mysql-udf-regexp

** Didn’t see the comment when I posted my answer, sorry.

0
source

All Articles