Skip to content

Instantly share code, notes, and snippets.

@pedrodelgallego
Created August 6, 2010 14:01
Show Gist options
  • Save pedrodelgallego/511352 to your computer and use it in GitHub Desktop.
Save pedrodelgallego/511352 to your computer and use it in GitHub Desktop.
var __re = new RegExp(x,"g");
var __instance = String("asdf");
var __str = "1";
//////////////////////////////////////////////////////////////////////////////
//CHECK#1
if (__instance.replace(__re, __str) !== "1a1s1d1f1") {
$ERROR('#1: var x; var __re = new RegExp(x,"g"); __instance = String("asdf"); __str = "1"; __instance.replace(__re, __str) === "1a1s1d1f1". Actual: '+__instance.replace(__re, __str) );
}
//
//////////////////////////////////////////////////////////////////////////////
var x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment