AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Previous Tag Not Working Python
 
 

I am trying to implement the previous tag % but it is just skipping straight to the end. I am using the knock knock example. When I type knock knock it replies with <star>! That’s hilarious and skips the who is there portion.

knock knock
Who is there?

+ *
who is there
- <starwho?

+ *
% * 
who
lol! <star>! That's hilarious! 


Here is part of the debug that I get when it finally gets to the knock knock part:

[RS] Try to match 'knock knock' against 'knock knock' ('^knock knock$')
[RS] Found a match!
[RS] ReplyWho is there?
[RS] Get reply to [localuser] knock knock
[RS] Checking topic random 
for any %Previous's.
[RS] There is a %Previous in this topic!
[RS] lastReply: who is there
[RS] Try to match lastReply (who is there) to who is there (re.compile('
^who is there$'))
[RS] Bot side matched!
[RS] Now try to match knock knock to *
[RS] Found a match!
[RS] Reply: <star> who?
[RS] Get reply to [localuser] knock knock
[RS] Checking topic random for any %Previous'
s.
[RS] There is a %Previous in this topic!
[RS] lastReplyknock knock who
[RS] 
Try to match lastReply (knock knock whoto who is there (re.compile('^who is there$'))
[RS] Try to match lastReply (knock knock whoto who (re.compile('^(.+?) who$'))
[RS] Bot side matched!
[RS] Now try to match knock knock to *
[RS] Found a match!
[RS] Replylol! <star>! That's hilarious!
[RS] Get reply to [localuser] knock knock
[RS] Checking topic random for any %Previous'
s.
[RS] There is a %Previous in this topic!
[RS] lastReplylol knock knock that's hilarious 
 

 
  login or register to react