Q:

Javascript not working with my Regex

I want to use Regular expression in Javascript split() method
Target String to run a split method against is:

type=Search&searchType=simple&searchField=partOne &&
  partTwo&highlight=partOne&isAllProductsContext=true&isAllProductInstance=false&contextId=&effectivity=

My code:
this.regexPattern = new RegExp("((?<=&&)&(?!&))|((?<!&)&(?!&))",'ig');
var keysAndValuesArray = targetString.split(regexPattern);

A:

Javascript regex engine doesn't support lookbehind as in your regex.
You will need to rewrite your regex to be used in Javascript. If you define your problem clearly we can give you some alternatives.
UPDATE Here is Javascript code that can work with OP's requirements:
s = 'type=Search&searchType=simple&searchField=partOne && partTwo&highlight=partOne&isAllProductsContext=true&isAllProductInstance=false&contextId=&effectivity=';
m  = s.match(/[^&]+(?:&&[^&]*)?(?=&|$)/g);

**OUTPUT:
["type=Search", "searchType=simple", "searchField=partOne && partTwo", "highlight=partOne", "isAllProductsContext=true", "isAllProductInstance=false", "contextId=", "effectivity="]

