I am working with Prism.js for syntax highlighting and I have a regex for detecting Kotlin infix function (?<=\w\s)(\w+)(?=\s\w)
(https://regex101.com/r/wVSO6G/1) which uses a positive look ahead and a positive look behind, however this does not work on Safari browsers which breaks my entire website.
I have seen alternatives that involve using the matcher but I don't have that option as I can only provide the regex, for example:
"infix": [
{
pattern: /(?<=\w\s)(\w+)(?=\s\w)/,
},
],
Is there an alternative to this that would work on Safari?