How to implement regex function in Microsoft bot composer

Viewed 311

How to implement regex in Bot composer ? Below I have a scenario where user can enter any thing like: Qna-1234, Qna-{1234} etc. From above I want to display only 1234 in the response. How can I achieve this it will be very helpful if provided some solution.

enter image description here

2 Answers

Yes, there is a workaround to achieve this requirement without regex. You can update the expected user responses section. You can define an entity to extract just an Id from user expressions. Refer below screenshots for details.

Prompt for text

Update expected responses

Result - check in emulator

Related