你好,如果我有以下字符串
这似乎找到了节点......好的,但输出如下
我怎样才能删除...并打印出来?我正在使用 PHP
谢谢!
最佳答案
你应该使用 str_replace :
$newString = str_replace('...', '', $string);
使用正则表达式来完成如此简单的任务简直是矫枉过正 will hurt performance :
Avoid regexes in favor of str_replace() and strstr(). Don’t use regexes unless you really need them. The string functions are much faster.
关于php - 如何从 PHP 中的字符串中删除 ...?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5439304/