[thelist] php parse/reg ex

Marshall Wood donkieonthehead at gmail.com
Tue Apr 25 13:02:14 CDT 2006

I have a field in my database that contains a block of data.  The data
is formatted so it can be parsed.

Here is an example of data I'll give the names of the values instead
of the values themselves, there is usually 30 of them in one field. 
Name:::::Value~|||||, the ::::: seperates the Name from the Value, the
~ seperates the Value from the Value, if there is more then one Value
per Name, and ||||| seperates the Name from the Next name, but not in
all cases.  This is an example of one that has no value.
Name:::::~|||||.  Occaasionally they get a bit out of wack, down
further in the field, here is an example of one that is out of wack,
but I still need the values that it holds. 

I have been trying explode() but that does no good, I think its fine
for the first "Name", the the Value ends up being the rest of the
data.  :(  Any and all help would be appreciated, I am thinking RegEx
might be the best bet but a help push start would be awesome.

More information about the thelist mailing list