MySQL模式匹配与替换

MySQL模式匹配与替换,mysql,pattern-matching,Mysql,Pattern Matching,我有一个带有设置列的表,在三个不同的行中包含以下数据: {{product.description}} {{user.email}} {{last_date}} 我想用动态数据附加字符串“|format”,输出应该如下 {{product.description | format}} {{user.email | format}} {{last_date | format}} 我尝试使用MySQL方法,但问题是如何匹配这个指定的模式 对此的更新查询是什么 you can use th

我有一个带有设置列的表,在三个不同的行中包含以下数据:

{{product.description}}

{{user.email}}

{{last_date}}
我想用动态数据附加字符串“|format”,输出应该如下

{{product.description | format}}

{{user.email | format}}

{{last_date | format}}
我尝试使用MySQL方法,但问题是如何匹配这个指定的模式


对此的更新查询是什么

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

希望有帮助。

要获得适当的输出,更新查询将是什么请查看此链接。它也有类似的问题和解决方案。