PageRenderTime 49ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/quicky/classes/plugins/modifier.count_sentences.php

https://bitbucket.org/seyar/parshin.local
PHP | 8 lines | 5 code | 2 blank | 1 comment | 0 complexity | c061b3e5b77ecce3e1dbf86a7dff9fd0 MD5 | raw file
Possible License(s): BSD-3-Clause, LGPL-2.1
  1. <?php
  2. function quicky_modifier_count_sentences($string)
  3. {
  4. // find periods with a word before but not after.
  5. return preg_match_all('~\S\.(?!\w)~',$string,$match);
  6. }