Menu
Hello
I have following syntax in a webpage:
.
.
var str=””;
str=document.getElementById(‘some_id’).value;
str=str.replace(/(<><>
.
.
my variable ‘str’ gets correct inital value but if I in my textarea with id ‘some_id’ type:
<IM>picture1</IM>
<IM>picture2</IM>
the output vill be:
bild: picture1
picture2
i.e my regular expression does just take the first match even if I have set it with parameter ‘g’ that what I know means ‘look in the hole text’
I dont know what I’m missing and would be glad if anyone could explain this to me.
Regards /DS