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?

1 Answer 1

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

Hope it helps.

Sign up to request clarification or add additional context in comments.

2 Comments

What will be the UPDATE query to get the appropriate output
Please Check this link out. It has similar question and a solution. stackoverflow.com/questions/10465288/mysql-update-with-regexp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.