1

What I mean:

Example

$pattern = '/^[s]{1,5}/';
$str = 'sssssssssssss';
$a = preg_match($pattern, $str);

echo $a; // $a => 1 (true)

But I need to validate only strings below 6 symbols length. Allowed to use only regular expressions!

Gregory Sysoev
  • 173
  • 1
  • 15

0 Answers0