Who has an underscore in their name?
But yeah, if that's an issue, put that in between the brackets as well. Does anyone have a
number
in their name?
If they do, then maybe we want
[\\w .'-]
which will match that well-known Buffista
p.m-m'm_ m4rc0nt3ll
because the \\w includes all letters, numbers and the underscore.
Who has an underscore in their name?
Jenny_G comes to mind.
I mean, really, there's no limit to the punctuation, isn't there? Didn't a /mieskie register (and get booted, but, yeah, well)? Someone could register with an asterisk. Maybe someone has.
Spawn1, DCM1101 (Paul's user name), and a couple others I think use numbers. Anyone with ~? I know they were popular before WX let you lc your name without them.
Also, FUCKERS!!!!!
We seem to have a lot of characters in usernames that I wouldn't have expected.
It it's really that complicated, I think the concept of email address needs to be redefined to be "the bits wrapped around the @", and put the username somewhere else.
Not that you can't write a regular expression to say "anything at all goes here" but then you have to start working from the other end, "anything at all except for the @ symbol", etc.
Ooo! Did I mention we have people with @ in their names?
Did I mention we have people with @ in their names?
One user. I'm sure we could ask him to change it.
Yeah, that's a good idea.
How hard would it be to make some characters illegal in usernames?
I'm still a bit confused as to why we're recording, or using, people's names in the format:
John H <john@something.com>
surely if we just use the
john@something.com
bit the problem goes away?
Or, alternatively, why don't we run a quick regex over the name we're inserting, the bit in red here:
John H <john@something.com>
so that, even if my chosen username is:
J_@h.n _.*._ ~-H-~
it gets stripped back to the legal characters before being used.