this means that the regexp isn't matched
from what i can say that part says title <tab> t<somenumber> data ..
if the regexp matches then the data is parsted in the variable
Code: Select all
regexp {title/tt[0-9]+/} $oldpage location
so if this is 0 then its not parsed => proof:
% regexp {s} {string} a
1
% puts $a
s
% unset a
% regexp {b} {string} a
0
% puts $a
can't read "a": no such variable
%
so unless its not set anywhere else (which i can't say it does), then its because the page doesn't match any results or that it gives a different page then expected.
or you might wana map \" \\\" from input chars and so on...
try adding this in the begining of the proc
it might not work but its worth to try i suppose ..
Code: Select all
set arg [string map {\\ \\\\ \" \\\" \{ \\\{ \} \\\} \[ \\\[ \] \\\] \( \\\( \) \\\)} $arg]