I have the following:

(deftemplate autoMultiString (multislot text))
(assert (autoMultiString (text "Olds Delta 98 1999")))

;;******************************************************
(defrule findLastTokenYear
    ?a<-(autoMultiString (text $?first ?test $?restOfIt))
    (test (numberp ?test))
    ;;(test (not(numberp (sym-cat ?restOfIt))));; this did not work
either
    ;;(test (not(numberp (implode$ ?restOfIt))));; neither did this
    (test (not(numberp (str-cat ?restOfIt))))
=>
    (printout t "%%%findLastTokenYear FIRED " ?test " #" (str-cat
?restOfIt) "&&" crlf)
)

The intent is for this rule to fire on ONLY  the last numeric token in
the multifield.

It fires twice -

%%%findLastTokenYear FIRED 98 #1999&&
%%%findLastTokenYear FIRED 1999 #&&

I'd expect only the 2nd one to occur.  What am I doing wrong here?

Thanks in advance,

Michael Lucero



---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to