[PHP] preg_split problem

2004-03-11 Thread [EMAIL PROTECTED]
I have a problem separting a text string with the preg_split function If somebody could help, it would be greatly appreciated. - The problem I have is that my code, so far, does the job, except it recognises ALL : and not only those following PAGE. This should be fairly easy to solve?

Re: [PHP] preg_split problem

2004-03-11 Thread Jason Wong
On Wednesday 10 March 2004 19:53, [EMAIL PROTECTED] wrote: I have a problem separting a text string with the preg_split function If somebody could help, it would be greatly appreciated. - The problem I have is that my code, so far, does the job, except it recognises ALL : and not only

[PHP] preg_split problem

2002-11-09 Thread samug
Could someone tell me why isn't this working? $text = And what did I tell you?; list($one,$two,$three,$rest) = preg_split(/\s+/, $text); print($rest); The result would be I and not I tell you? Why? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] preg_split problem

2002-11-09 Thread Marek Kilimajer
list throws away the other two array elements, you need list($one,$two,$three,$rest) = preg_split(/\s+/, $text, 4); samug wrote: Could someone tell me why isn't this working? $text = And what did I tell you?; list($one,$two,$three,$rest) = preg_split(/\s+/, $text); print($rest); The result

Re: [PHP] preg_split problem

2002-11-09 Thread Jason Wong
On Sunday 10 November 2002 00:58, samug wrote: Could someone tell me why isn't this working? $text = And what did I tell you?; list($one,$two,$three,$rest) = preg_split(/\s+/, $text); print($rest); The result would be I and not I tell you? Why? Because that is what you asked for! $doo =

Re: [PHP] preg_split problem

2002-11-09 Thread Ernest E Vogelsinger
At 17:58 09.11.2002, samug said: [snip] $text = And what did I tell you?; list($one,$two,$three,$rest) = preg_split(/\s+/, $text); print($rest); The result would be I and not I tell you? [snip] Your regex splits the