for http and www just use:
sMessage = sMessage.replace("http","http");
and
sMessage = sMessage.replace("www","www");
It will see that the message has all of those grouped together, so it will make the group not change. It should work, but I haven't tested it >_>.
As for aaa --> AAA, I still haven't figured that out
. I was thinking perhaps:
sMessage = sMessage.replace("a"*,"A"*);
(using * as a random character, so whatever comes after the A will be capital also). This obviously didn't work, and I am sure the solution is simple, but I have no idea lol.
Hopefully somone more experienced in scripting comes along to help you out
.
EDIT:
How are you gonna handle links? Even if the "www" and "http" are correct, the address will still be incorrect will it not?