Hello,
We are using the chat hack to integrate IRC chat in our forums. The problem is with usernames that are valid in VB, but not in IRC. What I would like to do is add a piece of code to check usernames and remove invalid characters as they are sent into chat.
ie. [A.O.E.]sNiPeR (that's an example of a REAL username in our forums).
The regex I need (I could never grasp how to write regular expressions) would remove any brackets and convert periods and space to underscores. So, in this example, it would become:
A_O_E_sNiPeR
Or in the case of a space, like: The Dude, would become The_Dude.
Can someone PLEASE give me a code snippet that will do that?
THANKS!!!!!
|