这样的正则表达式怎么写
var msgstr= "[/:FC20]aaaa[/:FC40]bbbbb[/:FC50]....... "
现在我想把上面的替换成
<img src= "20.gif "> aaaa <img src= "40.gif "> bbbbb <img src= "50.gif ">
[/:FC50] 这是表情符,数字部分是50,有可能是01,02,03等等,但肯定是两位数字
[/:FC50]表情符个数是不定的
------解决方案-------------------- <script>
var str= "[/:FC20]aaaa[/:FC40]bbbbb[/:FC50]....... "
var re=/\[\/:FC(\d{2})\]/g;
str=str.replace(re, " <img src=\ "$1.gif\ "> ");
alert(str);
</script>
------解决方案-------------------- <script language=javascript>
var msgstr= "[/:FC20]aaaa[/:FC40]bbbbb[/:FC50]....... "
re=/\[\/:FC(\d{2})\]/g
alert(msgstr.replace(re, " <img src=\ "$1.gif\ "> "))
</script>