我有这个分隔符的2部分的数据 |
$data = 'hello | Hello there
price | Lets talk about our support.
how are you ?| Im fine ';
我的静态词是 $word= 'price'
我的密码
$msg = array_filter(array_map('trim', explode("\n", $data)));
foreach ($msg as $singleLine) {
$partition = preg_split("/[|]+/", trim($singleLine), '2');
$part1 = strtolower($partition[0]);
}
如何匹配数据?我需要的结果是这样的:Let's talk about our support
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句