0

Hello im working on a chatbot which will give flight status. My bot is working fine if user inputs SU 1234, bot understands "SU" airline code and "1234" is the number. but if the user doesn't give space like "SU1234" bot cannot identify parameters of airline or flight number. Please help me to understand the bot ti search in a word.

1 Answers1

0

With no code posted it's impossible to tell you what's wrong.

As a general advice I can say that if you have a regex and you want to match both "SU1234" and "SU 1234" then you may try something like /(\w+)\s*(\d+)/ etc. - with optional whitespace. But I don't know if you're even using regexes at all since you're asking us to find problems in code that you haven't provided.

rsp
  • 107,747
  • 29
  • 201
  • 177
  • Thank you for the message. Im working with API.ai Intents and Entities and in it we can check the user questions. in that parameters for SU1234 is not identified, but it can identify SU 1234. –  Jul 11 '17 at 14:48