Subj : Re: string declaration without evaluation To : Moe tokrot From : Brendan Eich Date : Wed Jun 02 2004 11:03 pm Moe tokrot wrote: > const char my_string[]="var src=\"text \""; > > JS_EvaluateScript(cx,obj,my_string,strlen(my_string), filename, lineto, > &rval); > > My goal is to analyse src (not evaluated...the string exactly as above ) > with a regexp: > > const char my_string2[]="src.replace(my_regexp)"; > > JS_EvaluateScript(cx,obj,my_string2,strlen(my_string2), filename, lineto, > &rval); > > > is it possible in this way or another one ?? Sure, you can do that. Did you try it? Even better would be to combine the two strings and JS_EvaluateScript calls into one C string and JS_EvaluateScript call. /be .