pcre expression for irc nicknames?

elated

New Member
Hey guys, I'm having a few issues with using PCRE to make a irc nickname format correctly. I'm not good with PCRE, and I'd love some suggestions from those of you who do use PCRE / regex. :)I'm currently using this expression: \[code\]/^([^A-Za-z]{1})([^A-Za-z0-9-.]{0,32})$/\[/code\]I'm using it as such: \[code\]preg_replace($regex, $replaceWith, $content)\[/code\]I assumed this meant, starting from the front to the end, any characters that are not A-Z, a-z, or 0-9 for the first character, replace it. Any characters after that, in which are not A-Z a-z, 0-9, -, or ., replace it.If anyone could help, you would be helping out greatly. It's the only thing stopping me from releasing a chat product to a new forum software. :/
 
Back
Top