I am trying to write a regex to detect the first occurrence of words in a string but I can't figure out the right rules to get it to work. In a string like "Find product Apple iPhone", I need to only detect "Find product" since that is a keyword that I use to trigger some code.
Right now, I use this regex /^Find product$/i
but it seems to only work if my string only contains "Find product" and nothing else. How do I fix this? I need this to go into my Microsoft Bot Framework code: https://learn.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-dialog-actions#bind-a-triggeraction.