/is';preg_match_all($search,$str ,$r);"; Finally execute the file."/> /is';preg_match_all($search,$str ,$r);"; Finally execute the file.">
Home > Article > Backend Development > How to implement PHP regular matching that does not contain a certain character
How to implement php regular matching that does not contain a certain character: first create a PHP sample file; then enter the statement "$search = '/86c0a704063348751055e842f0ab8514/is ';preg_match_all($search,$str,$r);"; Finally, execute the file.
Recommended: "PHP Video Tutorial"
php Regular matching content does not include A certain character
Specific question:
I need to match characters that include 6d267e5fab17ea8bc578f9e7e5e1570b, but they cannot contain 04e913388da01775a4f8f7a1930af93a> and dec3ace20c729a46134a59cb893ab081
I want to match d7eea8d76a7c5d1c127f2cb188d613c3 and dec3ace20c729a46134a59cb893ab081
Implementation method:
<?php $str = '客户您好,为您推荐以下项目:<项目2:项目名称<项目3:项目名称>>以及<项目1:项目名称>'; $search = '/<([^<]*?)>/is'; preg_match_all($search,$str,$r); echo '<pre class="brush:php;toolbar:false">'; print_r($r); echo ''; ?>
The above is the detailed content of How to implement PHP regular matching that does not contain a certain character. For more information, please follow other related articles on the PHP Chinese website!