We need a more detailed example than that in order to be able to help you. I
can't see any pattern in the examples you gave us so it's very likely that
the expression we would develope would be wrong.
Either way.. this might be what you're looking for:
$string = "var1: val11 val12 ... val1N var2: val21 val22 ... val2M ... varI:
valI1 ... valIJ";
$new_string = ereg_replace(" ([a-zA-Z0-9]+)\:", "\n\\1:", $string);
Erik Andersson ( E.N.E IT - Australia )
- Australian, high quality web hosting from AU$4.95, all features included.
"Sebastian Araya" <com.ar> wrote in message