[PHP] preg_split

2006-11-03 Thread Google Kreme
OK, I have this file: $cid=preg_split('^([^,]+),\s?(.*)', $line, -1, PREG_SPLIT_DELIM_CAPTURE); } ?> the trouble is, $cid is empty. The actual file has lots of print lines, so I know that $lines is an array with each line for $CID_FILE as one element of the array and t

Re: [PHP] preg_split function.

2005-08-15 Thread John Nichel
João Cândido de Souza Neto wrote: I´m using the webmiau webmail system in a server with freebsd and php 4.4.0 but it´s not working. When i try to start the webmail server i get the error bellow: Fatal error: Call to undefined function: preg_split() in /usr/local/www/data-dist/webmail/smarty/Sm

[PHP] preg_split function.

2005-08-15 Thread João Cândido de Souza Neto
I´m using the webmiau webmail system in a server with freebsd and php 4.4.0 but it´s not working. When i try to start the webmail server i get the error bellow: Fatal error: Call to undefined function: preg_split() in /usr/local/www/data-dist/webmail/smarty/Smarty.class.php on line 1609 Anyon

[PHP] preg_split function.

2005-08-15 Thread João Cândido de Souza Neto
I´m using the webmiau webmail system in a server with freebsd and php 4.4.0 but it´s not working. When i try to start the webmail server i get the error bellow: Fatal error: Call to undefined function: preg_split() in /usr/local/www/data-dist/webmail/smarty/Smarty.class.php on line 1609 Anyon

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 no

[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 - spliting string

2004-03-07 Thread Bambero
Burhan Khalid wrote: Bambero wrote: Hi I need to split a string by the: , (comma) separator, but when the comma is beetwen "" it should be skipped. Ex: test ts sasa, assas "sasa,asaas" dasdas, da => test ts sasa => assas "sasa,asaas" dasdas => da If this is a CSV file, you can try fgetcsv. F

Re: [PHP] preg_split - spliting string

2004-03-06 Thread Burhan Khalid
Bambero wrote: Hi I need to split a string by the: , (comma) separator, but when the comma is beetwen "" it should be skipped. Ex: test ts sasa, assas "sasa,asaas" dasdas, da => test ts sasa => assas "sasa,asaas" dasdas => da If this is a CSV file, you can try fgetcsv. From http://www.php.net/fg

[PHP] preg_split - spliting string

2004-03-06 Thread Bambero
Hi I need to split a string by the: , (comma) separator, but when the comma is beetwen "" it should be skipped. Ex: test ts sasa, assas "sasa,asaas" dasdas, da => test ts sasa => assas "sasa,asaas" dasdas => da Thx Bambero -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

[PHP] preg_split

2002-12-28 Thread Mr Nik Frengle
I have the following code with a rather odd behaviour: Test> Hopefully it gets done here I would like that very much but whether it will happen or not is difficult to say.'; $Xarray=preg_split('/(?=)/',$string,-1, 'SPLIT_DELIM_CAPTURE'); $count=count($Xa

Re: [PHP] preg_split() - pattern problem

2002-11-11 Thread Jonathan Sharp
I believe it's U so try /T.*0.*B/U -js Jason Wong wrote: > On Tuesday 12 November 2002 02:26, Tobias Talltorp wrote: > >>How would I write the pattern for this preg_split()? >>"/T.*O.*B/", seems to only return the first and last portion of the string >>(1: Once upon a time, 2: going for a walk)

Re: [PHP] preg_split() - pattern problem

2002-11-11 Thread Jason Wong
On Tuesday 12 November 2002 02:26, Tobias Talltorp wrote: > How would I write the pattern for this preg_split()? > "/T.*O.*B/", seems to only return the first and last portion of the string > (1: Once upon a time, 2: going for a walk). > > $string = "Once upon a time T:O.B there was a T.O,B duck wh

[PHP] preg_split() - pattern problem

2002-11-11 Thread Tobias Talltorp
How would I write the pattern for this preg_split()? "/T.*O.*B/", seems to only return the first and last portion of the string (1: Once upon a time, 2: going for a walk). $string = "Once upon a time T:O.B there was a T.O,B duck who was T-O'B going for a walk"; $array = preg_split('/T.*O.*B/', $s

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 rege

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 aske

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 re

[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: http://www.php