0
A
回答
3
由于您没有指定要替换它的内容:
preg_replace("/{{([^:}]+)::([^:}]+)}}/", "First_param: $1, Second_param: $2", $target_string);
这将返回First_param: anythinghere, Second_param: anythingthere
。
相关问题
- 1. PHP Preg_replace字符串
- 2. PHP preg_replace字符串
- 3. PHP的preg_replace字符串中提取
- 4. 用php替换一次字符串preg_replace
- 5. 使用preg_replace替换另一个字符串的文本字符串
- 6. 的preg_replace字符串标签
- 7. PHP的preg_replace和\字符
- 8. PHP的preg_replace特殊字符
- 9. PHP的preg_replace文本变量
- 10. PHP的preg_replace插入串入输入字符串
- 11. 的PHP的preg_replace数字字符
- 12. php preg_replace:用于ASCII字符串的unicode修饰符
- 13. 如何用PHP替换字符串中的特定子字符串preg_replace
- 14. 如何用数组中的字符串替换子字符串使用preg_replace? (PHP)
- 15. PHP的文本字符串变量
- 16. PHP替换字符串中的文本
- 17. 缩短PHP中的文本字符串
- 18. 从字符串的PHP文本提取
- 19. php内的文本字符串
- 20. 使用PHP的preg_replace替换两个字符串之间的值
- 21. PHP中preg_replace()的字符串的最大长度?
- 22. 的preg_replace没有忽视[]从字符串
- 23. 带数组的preg_replace字符串
- 24. 字符串中使用的preg_replace
- 25. 替换preg_replace中的字符串
- 26. PHP字符串连接 - 文本消失
- 27. {PHP}分割文本字符串
- 28. PHP:替换字符,使异常(的preg_replace)
- 29. PHP:的preg_replace()字符做出例外
- 30. 剥离查询字符串用PHP(的preg_replace)
你想用什么来代替它们? – Spudley
假设其余的是文字字符,定义*任何*。也回答** Spudley **的问题。 –
用什么取代什么?给我示例字符串和期望的结果 –