<?php
$str='hello wehe fasdsf sdff coming sf being';
$reg='/\b\w+(?!ing\b)/';//无法达到预期效果
//$reg='/\b\w+(?=ing\b)/';//可以达到预期效果,结果: com be
preg_match_all($reg, $str, $res);
print_r($res);
什么原因
Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号