Mercurial > forge
changeset 12378:355d7a8e6382 octave-forge
FormatValue tag added in initial regexp parsing pattern
author | prnienhuis |
---|---|
date | Thu, 20 Feb 2014 21:58:20 +0000 |
parents | a56cd865541e |
children | d04e8ded9d0d |
files | main/io/inst/private/__OCT_gnm2oct__.m |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/main/io/inst/private/__OCT_gnm2oct__.m Mon Feb 17 16:38:14 2014 +0000 +++ b/main/io/inst/private/__OCT_gnm2oct__.m Thu Feb 20 21:58:20 2014 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2013 Philip Nienhuis +## Copyright (C) 2013,2014 Philip Nienhuis ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -29,7 +29,8 @@ ## 2013-11-03 Fix processing chunks ## '' Get ValueType using getxmlattv, not regexp ## '' Process Boolean type -## 2013-11-15 Replace slow xml node parsing by regexp a la Markus Bergholz +## 2013-11-15 Replace slow xml node parsing by regexp a la Markus Bergholz +## 2014-02-20 Add ValueFormat tag to regexp pattern function [ rawarr, xls, rstatus] = __OCT_gnm2oct__ (xls, wsh, cellrange='', spsh_opts) @@ -99,7 +100,7 @@ cells = getxmlnode (xml, "gnm:Cells"); ## Pattern gets all required tokens in one fell swoop - pattrn = '<gnm:Cell Row="(\d*?)" Col="(\d*?)" (?:ValueType="(\d*?)"|ExprID="(\d*?)")>(.*?)</gnm:Cell>'; + pattrn = '<gnm:Cell Row="(\d*?)" Col="(\d*?)" (?:ValueType="(\d*?)"|ExprID="(\d*?)")(?: ValueFormat="\w+")>(.*?)</gnm:Cell>'; allvals = cell2mat (regexp (cells, pattrn, "tokens")); ## Reshape into 4 x ... cell array