online24
05-23-2006, 11:31 AM
Have a nice day ! I have this folowing code and it won't run? I can't understand why, pls help me solve this thanks.
I have a string, and I need to use match (to retrieve what i need) and use substr or replace (to replace my signs)
var orgstring = "!u!http://annt/newspage/media/stories/jerryc_canonrock.wmv!u!!w!300!w!!h!60!h!!s1!false!s1!!s2!true!s2!!s3!false!s3!";
var urlthis = orgstring;
urlthis = urlthis.match(/!u!(.*?)!u!/g);
urlthis = urlthis.replace("!u!",'');
I tried to use match and replace alone -> it runs. But use both -> it did'nt word.
What can I do ? pls
I have a string, and I need to use match (to retrieve what i need) and use substr or replace (to replace my signs)
var orgstring = "!u!http://annt/newspage/media/stories/jerryc_canonrock.wmv!u!!w!300!w!!h!60!h!!s1!false!s1!!s2!true!s2!!s3!false!s3!";
var urlthis = orgstring;
urlthis = urlthis.match(/!u!(.*?)!u!/g);
urlthis = urlthis.replace("!u!",'');
I tried to use match and replace alone -> it runs. But use both -> it did'nt word.
What can I do ? pls