The following two lines work in firefox but will not evaluate in Rhino
(1.7 release 1 2008 03 06)

var str="This is the A string and the B string";
var y=str.replace(/&#(\d+);/g,function() {return
String.fromCharCode(RegExp.$1);});

y===>This is the A string and the B string

Rhino indicates that the RegExp.$1 variable is undefined and the
String.fromCharCode -- returns char(0) to be placed into the output
string.

Anyone know why this would be the case?
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to