in reply to Re^2: Regex Parsing
in thread Regex Parsing

I think you have an excellent solution using split and array access. There is no reason to use a regex when other solutions will work equally well. Often, a regex will be more complicated or more fragile.

Now, there are some parsing problems that are better solved with a regex, but this isn't one of them. And, personally, I only use a regex when I cannot use other solutions.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^4: Regex Parsing
by cog (Parson) on Mar 28, 2005 at 16:28 UTC
    solution using split

    There is no reason to use a regex

    Technically speaking, a split uses a regex O:-)