fork download
  1. <?php
  2.  
  3. $str = "T&T Production 007 B.V.A.";
  4. $pattern = '/^[a-zA-Z0-9][a-zA-Z0-9\s.+&-]+$/';
  5. $validname = 0;
  6. $validname = preg_match($pattern, $str);
  7.  
  8. if ($validname == 0) {
  9. $flash_error .= _m('The name is not valid') . PHP_EOL;
  10. $error[] = 10;
  11. }
Success #stdin #stdout 0.02s 26588KB
stdin
Standard input is empty
stdout
Standard output is empty