Hello,
I have the following regex in PHP:
/(?<=\')[^\'\s][^\']*+(?=\')|(?<=")[^"\s][^"]*+(?=")|[^\'",\s]+/
and I would like to port it to javascript like:
var regex = new RegExp('/(?<=\')[^\'\s][^\']*+(?=\')|(?<=")[^"\s][^"]*+(?=")|[^\'",\s]+/');
var match = regex.exec("hello,my,name,is,'mr jim'")
for( var z in match) alert(match[z]);
There is something that JavaScript doesnt like here, but I have no idea what it is. I've tried looking for diferences between PHP and JS regex via regular-expressions.info but I cant see anything obvious.
Any help would be greatly appreciated
Thank you again
EDIT: The problem seems to lie within the positive lookbehind's but does this mean it cannot be ported?