Answers for "php match a word with special char and without"

PHP
1

php preg_match special characters

$string="sadw$"
  if(preg_match("/[\[^\'£$%^&*()}{@:\'#~?><>,;@\|\\\-=\-_+\-¬\`\]]/", $string)){
   //this string contain atleast one of these [^'£$%^&*()}{@:'#~?><>,;@|\-=-_+-¬`] characters
  }
Posted by: Guest on June-11-2021

Code answers related to "php match a word with special char and without"

Browse Popular Code Answers by Language