Because the substrings can contain any char-s including commas. Also I use reg exp not for splitting only but for validating whether whole string and the substrings are correctly formatted. Using reg exp requires much less coding than traditional programming.
> > Why not just strip out the braces and explode on commas? That'll be > lighter than regexps any day. If the input is guaranteed to be > formatted the way you describe, you could do something like: > > $out = explode(",", substr($in, 1, strlen($in)-2)); > > -- > Paul Chvostek <[EMAIL PROTECTED]> > it.canada http://www.it.ca/ > Free PHP web hosting! http://www.it.ca/web/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php