preg split

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi All,

Trying to split a string where there are occurances of a space, a comma, a  
newline (char 10), or a return (char 13) using the preg_split function, but  
not sure how to write the regular expression for this...

Anyone any idea please?


Re: preg split

$result = preg_split ('/ |,|\n/', $subject);

Quoted text here. Click to load it

Posted via a free Usenet account from

Re: preg split

*** Chris Thompson escribió/wrote (Wed, 26 Jul 2006 11:28:38 +0100):
Quoted text here. Click to load it

Not tested:


-+ - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web:
+- Mi web de humor con rayos UVA:

Site Timeline