Search code examples
watson-conversation

how to pass a user name(including Chinese Character) from dialog inputs through regular express?


We'd like to process the following scenario 1. user: "Hi" 2. Watson answers: Hi, what's your name? 3. user:"Joe楊" 4. Watson answers : Hi, Joe楊, welcome to Watson


Solution

  • Dialog node would be as shown below:

    enter image description here

    enter image description here

    When input text matches regular expression, it stores the input text to context variable $username ( as shown above)

    Output:

    enter image description here