changeset 11564:90f8d12f1964

avoid PCRE-ism in regexp
author John W. Eaton <jwe@octave.org>
date Wed, 19 Jan 2011 04:10:26 -0500
parents 3c6e8aaa9555
children 21c3e1370b82
files scripts/ChangeLog scripts/io/strread.m
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-19  John W. Eaton  <jwe@octave.org>
+
+	* io/strread.m: Avoid PCRE-ism in regexp.  Bug #32066.
+
 2011-01-17  Rik  <octave@nomad.inbox5.com>
 
 	* audio/wavread.m, deprecated/spqr.m, elfun/lcm.m, general/bitget.m,
--- a/scripts/io/strread.m
+++ b/scripts/io/strread.m
@@ -188,7 +188,7 @@
 
   ## Determine the number of words per line
   format = strrep (format, "%", " %");
-  [~, ~, ~, fmt_words] = regexp (format, "[^\\s]+");
+  [~, ~, ~, fmt_words] = regexp (format, "[^ ]+");
 
   num_words_per_line = numel (fmt_words);
   for m = 1:numel(fmt_words)