diff scripts/io/dlmwrite.m @ 11032:c9b0a75b02e8

Make all regexp in Octave compatible with both POSIX and PCRE.
author Rik <octave@nomad.inbox5.com>
date Tue, 28 Sep 2010 09:25:14 -0700
parents 306e40d773a9
children 994e2a93a8e2
line wrap: on
line diff
--- a/scripts/io/dlmwrite.m
+++ b/scripts/io/dlmwrite.m
@@ -172,7 +172,7 @@
                repmat ([repmat(delim, 1, c + columns(a)-1), newline], 1, r));
     endif
     if (iscomplex (a))
-      cprecision = regexprep (precision, '^%([-\d.])','%+$1');
+      cprecision = regexprep (precision, '^%([-.0-9])','%+$1');
       template = [precision, cprecision, "i", ...
                   repmat([delim, precision, cprecision, "i"], 1, ...
                   columns(a) - 1), newline ];