I have a regex that matches a single character x
but not xx
.
(?<!x)x(?!x)
This works great, the problem is the regex engine in firefox doesn't support look-behinds. (this bug)
Is there any way to rewrite this so it doesn't use a looking behind?
edit:
the solution in the duplicate link doesn't work in this case. If I replace the negative look-behind with
(?!^x)x(?!x)
It doesn't match correctly.