From: <cde...@us...> - 2010-08-25 09:39:24
|
Revision: 7569 http://octave.svn.sourceforge.net/octave/?rev=7569&view=rev Author: cdemills Date: 2010-08-25 09:39:17 +0000 (Wed, 25 Aug 2010) Log Message: ----------- - the regexp to split fields rejected numerical signs and decimal part delimiter Modified Paths: -------------- trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m Modified: trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m =================================================================== --- trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m 2010-08-24 13:29:18 UTC (rev 7568) +++ trunk/octave-forge/extra/dataframe/inst/@dataframe/dataframe.m 2010-08-25 09:39:17 UTC (rev 7569) @@ -142,7 +142,9 @@ fclose(fid); end_unwind_protect lines = regexp(in,'(^|\n)([^\n]+)', 'match'); %# cut into lines - content = cellfun(@(x) regexp(x, '(\b|'')[^,]+(''|\b)', 'match'), ... + %# a field either starts at a word boundary, either by + - . for + %# a numeric data, either by ' for a string. + content = cellfun(@(x) regexp(x, '(\b|[-+\.''])[^,]+(''|\b)', 'match'), \ lines, 'UniformOutput', false); %# extract fields indl = 1; indj = 1; %# disp('line 151 '); keyboard if ~isempty(seeked), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |