Well, the problem was, that those reference numbers were stored with the backslash for some reason.
I've modified the code to this:
It should probably work correctly now. This snippet will duplicate the phrase if finds a backslash “/” chacarcter, and use the duplicate keyword without them as well.Best,
If you like my products, don't forget to rate them on codecanyon :)