I don't know if we ever used this with a savetext variable or not. If a regex search like "#..#[^0-9\\]" in the regular FOSIs doesn't find anything, see if you can dig up the technical bulletin FOSI, as I think I was playing with some stuff along these lines in there.
In any case, help 544 (specval) says:
"#XX#YYY may be used for attributes whose declared value is a number where XX is one of the letter pairs LT, GT, EQ, LE, GE, NE and YYY is a numeric constant or an enumid (counter id). In this case, the specval will be satisfied if the value assigned to the given source document attribute is, respectively, less than, greater than, equal to, less than or equal to, greater than or equal to, or not equal to the given numeric constant or current value of the given counter.
The same syntax may be used for attributes whose declared value is not a number. In this case YYY is a backslash delimited literal or a textid (savetext name). If XX is a numerical operator (LT, GT, LE, GE), the two strings are compared character by character using the ordering of the default character set. It is safer to stick to the EQ and NE operators when comparing strings."
Jason, let me know if this works or not. If it doesn't, I've got an idea for an alternative approach involving baling wire, chewing gum and #XREF. 😉
-Brandon 🙂