我有一个带有设置列的表,在三个不同的行中包含以下数据:
{{product.description}}
{{user.email}}
{{last_date}}
我想附加字符串“|” format'与动态数据,输出应该是这样的
{{product.description | format}}
{{user.email | format}}
{{last_date | format}}
我尝试使用 MySQL REPLACE()方法,但问题是如何匹配这个指定的模式。
对此的更新查询是什么?
最佳答案
you can use the REGEXP operator as follows:
SELECT (statement) REGEXP '{product.description}[.space.]|[.space.]format';
希望有帮助。
关于MySQL 模式匹配和替换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28359393/