Re: Parsing arguments foo:bar foo:bar foo:bar

On Feb 10, 2:00 pm, puzzlecracker <ironsel2...@xxxxxxxxx> wrote:
array args of string internally looks like this, free spacing is
assumed:  foo:bar foo1:bar foo2:bar2 ...etc.  I need to quickly parse
the array  into  two strings each contaning foo and bar,

Do you perhaps mean "parse the array into two arrays of strings, one
for all 'foo', another for all 'bar'"? Otherwise it doesn't make much
sense to me, unless you want to ignore everything after "foo:bar" in
the input string.

Otherwise, what exactly is the problem? Use String.Split to split into
name-value pairs, then Split on each in turn to separate names and
values; add both to the corresponding List<string> instances, and
that's it.