【发布时间】:2013-08-24 04:11:48
【问题描述】:
我有大约 4000 个字符的 PHP 字符串;如果在这个 PHP 字符串 $input1、$input2 或 $input3 中的任何位置被识别,我想用 $output 字符串替换它。总之,我想在“\end{Figure}”之后删除“\newline”
$input1 = "\end{Figure}\newline";
$input2 = "\end{Figure} \newline";
$input3 = "\end{Figure}\newline "
Required output:
$output = "\end{Figure}";
您能否建议如何实现所需的输出?
【问题讨论】:
标签: php string replace preg-replace