我想做一些事情,比如从这条线得到相反的匹配:
$input = "21.asdf*234true;asdf0--11"
$_BOOL_ ="/(true|false)/i";
$output = preg_replace($_BOOL_, '', $input);
//Result: "21.asdf*234;asdf0--11"
//Desired result: "true"
php 5.3 中的哪个当然是
$output = preg_filter($_BOOL_, '', $input);
但是我在 5.2 上,不知道如何在这里得到我想要的……建议(除了在 ubuntu 上编译 5.3)?