Re: Separating Data
- From: Bob Stearns <rstearns1241@xxxxxxxxxxx>
- Date: Sat, 24 Jun 2006 01:22:21 -0400
J Huntley Palmer wrote:
I am getting data lines with data separated by these 5 characters:$array = preg_split("[,;:\t ]", $string, -1, PREG_SPLIT_NO_EMPTY);
, : ; <TAB> <whitespace>
eg. foo,bar:baz foobar
I would like to extract foo bar baz nad foobar.
How can I parse out the data between or separated by them?
Thanks!
The last argument takes care of consecutive delimiters.
See URL: http://php.benscom.com/manual/en/function.preg-split.php
.
- References:
- Separating Data
- From: J Huntley Palmer
- Separating Data
- Prev by Date: Separating Data
- Next by Date: Re: Object Oriented PHP
- Previous by thread: Separating Data
- Next by thread: Parsing CSV-file and adding CSS to style
- Index(es):