comparison scripts/pkg/get_forge_pkg.m @ 12468:46b3883d800c

fixed typo in PCRE style RE
author Carlo de Falco <kingcrimson@tiscali.it>
date Mon, 21 Feb 2011 17:12:25 +0100
parents e4dbfe3019b1
children
comparison
equal deleted inserted replaced
12467:2f83974d5a6d 12468:46b3883d800c
41 [html, succ] = urlread (sprintf ("http://octave.sourceforge.net/%s/index.html", name)); 41 [html, succ] = urlread (sprintf ("http://octave.sourceforge.net/%s/index.html", name));
42 if (succ) 42 if (succ)
43 ## Remove blanks for simpler matching. 43 ## Remove blanks for simpler matching.
44 html(isspace(html)) = []; 44 html(isspace(html)) = [];
45 ## Good. Let's grep for the version. 45 ## Good. Let's grep for the version.
46 pat = "<tdclass=""package_table"">PackageVersion:</td><td>([\d.]*)</td>"; 46 pat = "<tdclass=""package_table"">PackageVersion:</td><td>([\\d.]*)</td>";
47 t = regexp (html, pat, "tokens"); 47 t = regexp (html, pat, "tokens");
48 if (isempty (t) || isempty(t{1})) 48 if (isempty (t) || isempty(t{1}))
49 error ("get_forge_pkg: could not read version number from package's page"); 49 error ("get_forge_pkg: could not read version number from package's page");
50 else 50 else
51 ver = t{1}{1}; 51 ver = t{1}{1};