Does anyone know how to modify this code so it can work on all platforms?
it works on windows and chrome but not on iPhone/Desktop or any Safari browser
I attached a link to Stack Overflow below. Thanks!

I did not test out your code on Firefox or Safari, but my guess is it is the negative lookbehind you are using in the following regular expression. Neither Safari nor Firefox support them yet (Safari probably never will).


Thank you for your insight, it works! I will avoid regular expressions for these environments.