On 20-Jul-2001 Garth Dahlstrom wrote:
Hi all,
I'm trying to build a spell checker for a web form.
What has got me stumped is being able to do a split
so that whitespace and words are stored as seperate
elements of the same array.
ideally, I'd use some form of preg_split to put:
This
On 20-Jul-2001 Garth Dahlstrom wrote:
Hi all,
I'm trying to build a spell checker for a web form.
What has got me stumped is being able to do a split
so that whitespace and words are stored as seperate
elements of the same array.
ideally, I'd use some form of preg_split to put:
This
http://www.zend.com/zend/spotlight/spellchecking.php
- Original Message -
From: Don Read [EMAIL PROTECTED]
To: Garth Dahlstrom [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, July 20, 2001 11:41 PM
Subject: RE: [PHP] split on whitespace, preserving whitespace...
On 20-Jul-2001
Yup, I hear that... I'm going to use something like the following to
do my pspell application...
pre
?PHP
$text = This contans (brackets) {white} shaz-zam this_under space; .;
$matches = preg_split(/([\.\;\:\!\{\}\(\)\s]+)/,$text,-1,
PREG_SPLIT_DELIM_CAPTURE);
echo pre[$text]br[.
4 matches
Mail list logo