0

I have a table with settings column having the following data in three different rows:

{{product.description}}

{{user.email}}

{{last_date}}

I want to append the string '| format' with dynamic data, the output should be like this

{{product.description | format}}

{{user.email | format}}

{{last_date | format}}

I tried with MySQL REPLACE() method but problem is how to match this specified pattern.

What will be the UPDATE query for this?

Arif
  • 1,369
  • 14
  • 39

1 Answers1

0
you can use the REGEXP operator as follows:
SELECT (statement) REGEXP '{product.description}[.space.]|[.space.]format';

Hope it helps.

Michael Woyo
  • 138
  • 2
  • 15