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: /^([^A-Za-z]{1})([^A-Za-z0-9-.]{0,32})$/
I'm using it as such: preg_replace($regex, $replaceWith, $content)
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. :/