var html= "Ssssss @ username and Topic #话题标题 # with a different color high @ false Bright @ Username 2 and sss# This topic is wrong #ss";
var html1= "Ssssss @ username and Topic #话题标题 # with a different color high @ false Bright @ Username 2 and sss# This topic is wrong #ss";
var reg1=/(@[^]*)/g;
var reg2=/(#[^#]*#)/g;
var reg3=/(#[^#]*#)/g;
document.write (HTML);
document.write ("<br/>");
Html=html.replace (REG1, "<span style= ' color:red ' >$1</span>");
Html=html.replace (REG2, "<span style= ' Color:green;") >$1</span> ");
document.write (HTML);
document.write ("<br/>");
HTML1 = Html1.replace (reg3, "<span style= ' Color:blue;") >$1</span> ");
document.write (HTML1);
document.write ("<br/>");
var a = "20141021123212";
var reg4 =/(\d{4}) (\d{2}) (\d{2}) (\d{2}) (\d{2}) (\d{2})/;
A = A.replace (REG4, "$1-$2-$3 $4:$5:$6");
document.write (a);
document.write ("<br/>");
var c = "Good Ah {topic title} with different colors sss{This topic good}ss";
var reg5=/({[^{]*})/g;
c = C.replace (Reg5, "<span style= ' color:red ' >$1</span>");
document.write (c);
document.write ("<br/>");