SPUG:Split question

Jim Flanagan jimfl at tensegrity.net
Fri Mar 21 16:57:26 CST 2003


On Fri, 21 Mar 2003, Jim Flanagan wrote:

> @array = $string =~ /([^,],)/g;
> 
> Should get you what you want (in this particular case).

  I omitted a crucial element: It should be

      @array = $string =~ /([^,]+,)/g;

  (In case you have "abc,123,def,");

-- 
::jimfl

    http://jimfl.tensegrity.net
  mailto:jimfl%40t%65ns%65gr%69ty.n%65t




More information about the spug-list mailing list