fork download
  1. <?php
  2.  
  3. $re = '~(?<!т\.н)(?<!т\.к)(?<!e\.g)\.(?=\s+\p{L})~iu';
  4. $str = "cats, e.g. Barsik, are funny. And it is true. So,";
  5. preg_match($re, $str, $match, PREG_OFFSET_CAPTURE);
  6. echo $match[0][1];
Success #stdin #stdout 0.03s 52480KB
stdin
Standard input is empty
stdout
28