Okay... for usernames at my site, I'm looking to restrict specific characters. I've sort of been messing around with eregi and a pattern string. I can't seem to get my pattern string correct though.
What I'd like it to allow in usernames are single quotes ('), letters (upper & lowercase), numbers, underscores, hyphens (-), and spaces.
Most things I've come across when looking for help with the eregi function have to do with validating email addresses and are a little bit stricter/complicated looking than I know I need. (.[a-zA-Z0-9..-]+@[a-z0-9]+\.[a-z]+) Do allowed characters just have to appear somewhere in the string? How would a space be allowed? I know I don't need the +@ stuff and whatnot since I'm not validating an email address.