fork download
  1. <?php
  2. $string = "এখানে কিংকর্তব্যবিমূঢ় হবার কোনো সুযোগ নেই";
  3. $regex = '~^(?:\b\p{Bengali}+\s*){3}~u';
  4. if (preg_match($regex, $string, $match)) {
  5. echo $match[0];
  6. }
  7. ?>
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
এখানে কিংকর্তব্যবিমূঢ় হবার