Early in the development of a web project I work on I created this regex /(?<!\\)\w?\$.+?(?<!\\)\$/ which aims to match $ any text here$ as long as the first and last $ are not preceded by \.
A few examples are shown here https://regex101.com/r/Y1Uml9/1/
The regex works perfectly until I realised that iOS Safari and Chrome do not support lookbehinds. I tried to modify the regex myself but my basic regex skills were not able to produce a working one.
Any suggestions how to convert the regex so it works on iOS?