@nadeama, I think this should do the job for you.
Please test the below macro, and let me know if it works for you.
Turns out that there is no easy way to find the position of a substring within a string using non-script KM Actions. So, I wrote a general purpose script to do this.