quote:
Originally posted by Keikonium
So, a simple fix would be instead of:
code:
sMessage = sMessage.replace(/br/gi,"best reguards");
make it
sMessage = sMessage.replace(/ br /gi," best reguards ");
I think this would be even better:
code:
/(^|\s+)br($|\s+)/igm
And indeed use segosa's idea for the checking method