Hi, This might be a fancier solution:

var s  = "title.string1-color.string2-size.string3";
h={};
$.each(s.split('-'),function(x){
  var t = x.split('.');
  h[ t[0] ] = t[1];
});


~Sean


On 8/10/07, cfdvlpr <[EMAIL PROTECTED]> wrote:
>
>
> That's just the kind of help I needed.  Here's what I have now that
> works perfectly:
>
>
>                         var sArr = s.split('-');
>                         h = {};
>                         h['title'] = sArr[0].replace(/^.*\./,'');
>                         h['color'] = sArr[1].replace(/^.*\./,'');
>                         h['size'] = sArr[2].replace(/^.*\./,'');
>
>

Reply via email to