RE: [PHP] split on whitespace, preserving whitespace...

2001-07-20 Thread Don Read
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

RE: [PHP] split on whitespace, preserving whitespace...

2001-07-20 Thread Don Read
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

Re: [PHP] split on whitespace, preserving whitespace...

2001-07-20 Thread Alexandr Grinko
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

Re: [PHP] split on whitespace, preserving whitespace...

2001-07-20 Thread Garth Dahlstrom
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[.