I have spent the last hour looking for replies but I haven't found any yet, so here I ask...
I need a way (certainly regex, but everything else like explode is fine) to cut a sentence like the following into parts, in the same array:
This is the first part, this is the second part; this is the third part! this is the fourth part? again - and again - until the sentence is over.
I want an array with the following entries (without the spaces following or preceding or not the punctuation marks, please):
- [0] => "This is the first part"
- [1] => "this is the second part"
- [2] => "this is the third part"
- [3] => "this is the fourth part"
- [4] => "again"
- [5] => "and again"
- [6] => "until the sentence is over"
EDIT: Sorry, the following example is in English but it should be able to handle a whole variety of scripts (all of Unicode, basically).
Thanks a lot!