So I have this regular expression...
(?i)\b[p]*(ost)*\.*\s*[o]*(ffice)*\.*(?<=po|p.o|o\.|office|post)\s*[b][o][x]\b|(?<=\d\s|^)\s*[[b][o][x]]*(?!\s*[a-z])|(?<=\d\s|^)\s*[[p][o]]*(?!\s*[a-z])
If you look at regex101.com and run the unit tests in PHP you can see all the tests match.
However, that same regex fails in JS.
Seems to be an issue with the first ? and possibly the use of look-backs? I might as well be looking at Japanese.
Is there an easy way to make this regex compatible with JS?