Re: split()
| From: | erythros | Date: | Thu, 13 Nov 2003 13:21:15 +0000 |
| Subject: | Re: split() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169480@lists.php.net to get a copy of this message | ||
thanx for the help. i got it. when i saw what happened when i put the + at
the end i found what i needed.
split('[.!?] ', $data)
this way it only breaks them up if the . or ! or ? is followed by a space.
thanx again for the help.
"Eugene Lee" <list-php-1@fsck.net> wrote in message
news:20031113084551.GC353@Dark-Age.local...
> On Wed, Nov 12, 2003 at 09:48:37PM -0600, erythros wrote:
> :
> : trying to use split(). i want to split a paragraph by sentence. so of
course
> : i used split('[.!?]', $data). but then i noticed i use ... or .... every
now
> : and again at the end of a sentence. i don't know how to do this
though...
>
> How about preg_split('[.!?]+', $data) ?