I must be missing something, but I don't know what...
alert( source.indexOf( "source") );
var e3="\/source\/ig";
source=source.r eplace( e3, "pqrst" );
alert( source.indexOf( "pqrst") );
The first alert shows 8937, so the substring exists. Therefore,
"pqrst" must appear no later than 8937 in source, right? So why in
the world would I get 9091 for the second alert?
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
alert( source.indexOf( "source") );
var e3="\/source\/ig";
source=source.r eplace( e3, "pqrst" );
alert( source.indexOf( "pqrst") );
The first alert shows 8937, so the substring exists. Therefore,
"pqrst" must appear no later than 8937 in source, right? So why in
the world would I get 9091 for the second alert?
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Comment