function fuzzQuery(rawQuery)
{
re = /(?=[\(\) ])|(?<=[\(\) ])/;
strSplit = rawQuery.split(re);
alert(strSplit);
};
Does not work (no dialog box).
I've check the expression at http://rubular.com/ and it works as intended.
Whereas
re = /e/
does work.
The input string is
hello:(world one two three)
The expected result is:
hello:,(,world, ,one, ,two, ,three, )
I have looked at the following SO questions:
Javascript simple regexp doesn't work
Why this javascript regex doesn't work?
But I'm not making the mistakes like creating the expression as a string, or not double backslashing when it is a string.