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 URL字符串
- 4. PHP preg_replace空字符串
- 5. PHP preg_replace两个字符串之间的文本
- 6. Php Preg_replace带数组的字符串?
- 7. PHP的preg_replace字符串中提取
- 8. 用php替换一次字符串preg_replace
- 9. PHP preg_replace在现有字符串中插入字符串
- 10. 使用preg_replace替换另一个字符串的文本字符串
- 11. 的preg_replace字符串标签
- 12. PHP的preg_replace和\字符
- 13. PHP的preg_replace特殊字符
- 14. preg_replace剪辑字符串中的字符
- 15. 在php中使用preg_replace删除两个字符串之间的文本
- 16. PHP的preg_replace文本变量
- 17. preg_replace()返回空字符串
- 18. preg_replace \ n在字符串
- 19. preg_replace URL与MD5字符串
- 20. 用PHP替换字符preg_replace
- 21. php preg_replace用斜杠字符
- 22. PHP的preg_replace插入串入输入字符串
- 23. 的PHP的preg_replace数字字符
- 24. php preg_replace:用于ASCII字符串的unicode修饰符
- 25. PHP的preg_replace certrain串
- 26. 如何用PHP替换字符串中的特定子字符串preg_replace
- 27. 如何用数组中的字符串替换子字符串使用preg_replace? (PHP)
- 28. PHP添加字符串文本文件
- 29. php内的文本字符串
- 30. PHP替换字符串中的文本
你想用什么来代替它们? – Spudley
假设其余的是文字字符,定义*任何*。也回答** Spudley **的问题。 –
用什么取代什么?给我示例字符串和期望的结果 –