Tom:
As of Tcl 8.0, Tcl will pass the regular expression directly to the regular expression parser without interpretation as long as the expression is enclosed in squirlly braces.
If you put double quotes the Tcl interpreter will attempt to interpret backslash escapes, square braces, etc.
Therfore the correct method should be:
regexp — {Page d+ of d+}” $obx
You only need the double quotes and therfore double backslashes if part of your expression is a variable since the variable would not be interpreted inside the squirrly braces
Note however the regexp may still not work because regular expression, by default are greedy. That is they go for the maximum match. Therfore if I had a statement like: “Page 22 of 45”, the first part of the regular expression amy match all the way to the end consumng that and leaving nothing for the second part to match. Just to be sure I would make my regular expression non-greedy like so:
regexp — {Page d+? of d+}” $obx
I hope it makes sense 😀