mysql regex replace
REGEXP_REPLACE(expression, pattern, replacement[, position[, occurrence[, match_type]]])
Example 1 - remove all "-" characters
SELECT REGEXP_REPLACE( fieldname, '-', '' ) AS newfieldname FROM tablename
mysql regex replace
REGEXP_REPLACE(expression, pattern, replacement[, position[, occurrence[, match_type]]])
Example 1 - remove all "-" characters
SELECT REGEXP_REPLACE( fieldname, '-', '' ) AS newfieldname FROM tablename
mysql regexp replace
WITH t AS (SELECT 'aaa <b>bbb</b> ccc' AS teststring FROM dual)
SELECT
teststring,
regexp_replace(teststring, '<.+>') AS reg1,
regexp_replace(teststring, '<.*>') AS reg2,
regexp_replace(teststring, '<.*?>') AS reg3
FROM t
TESTSTRING REG1 REG2 REG3
aaa <b>bbb</b> ccc aaa ccc aaa ccc aaa bbb ccc
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us