Need help with regexp for preg_split
| From: | David Brannlund | Date: | Fri, 01 Nov 2002 12:14:11 +0000 |
| Subject: | Need help with regexp for preg_split | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-122410@lists.php.net to get a copy of this message | ||
Hi,
I need some help with a regexp for preg_split. I want the string
str = "this is 'a string that' contains phrases";
to be split into:
arr[] = "this";
arr[] = "is";
arr[] = "a string that";
arr[] = "contains";
arr[] = "phrases";
but I'm having some trouble coming up a good regexp that would do the job.
Any regexp gurus out there who can point me in the right direction?
Thanks,
David Brännlund