note 90267 added to function.str-word-count

From: Date: Mon, 13 Apr 2009 17:39:06 +0000
Subject: note 90267 added to function.str-word-count
Groups: php.notes 
Request: Send a blank email to php-notes+get-153187@lists.php.net to get a copy of this message
Personally, I dont like using this function becuase the characters it omits are sometime nessesery for instance MS Word counts ">" or "<" alone as single word where this function doesnt. I like using this however, it counts EVERYTHING: function num_words($string){ preg_match_all("/\S+/", $string, $matches); return count($matches[0]); } ---- Server IP: 64.71.164.2 Probable Submitter: 86.128.149.86 ---- Manual Page -- http://www.php.net/manual/en/function.str-word-count.php Edit -- https://master.php.net/note/edit/90267 Del: integrated -- https://master.php.net/note/delete/90267/integrated Del: useless -- https://master.php.net/note/delete/90267/useless Del: bad code -- https://master.php.net/note/delete/90267/bad+code Del: spam -- https://master.php.net/note/delete/90267/spam Del: non-english -- https://master.php.net/note/delete/90267/non-english Del: in docs -- https://master.php.net/note/delete/90267/in+docs Del: other reasons-- https://master.php.net/note/delete/90267 Reject -- https://master.php.net/note/reject/90267 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#153187) next »