1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

User Name Match Regular Expression

Discussion in 'XenForo Questions and Support' started by trilogy33, Feb 6, 2011.

  1. trilogy33

    trilogy33 Well-Known Member

    How do I use the "User Name Match Regular Expression" to enforce?:

    • Alpha Numerics
    • No special charcters
    • Allow underscores

    So in other words, same as twitter usernames like so...
  2. Floris

    Floris Guest


    or something. Can't confirm that works though :/ Server is doing heavy cpu work and my dev.area is very slow for the next ten minutes.
  3. trilogy33

    trilogy33 Well-Known Member

    Cheers Floris :)
  4. trilogy33

    trilogy33 Well-Known Member

    Think I've cracked it.


    Can have alpha numerics and underscores.
    Can not have special chars nor spaces.
    Allows spaces at beginning and end of string, which is weird but not immediate.
  5. Floris

    Floris Guest

    ah, the comma between them is not needed?
  6. trilogy33

    trilogy33 Well-Known Member

    Think so, yeah. It's all, as Brogan said before, "voodoo" :D
  7. DSF

    DSF Well-Known Member

    Don't forget: ö ä ü é à è Ö Ä Ü É À È as exemple ;)

    My expression
  8. trilogy33

    trilogy33 Well-Known Member

    Thanks for the info.
    Just tested È and the others, my expression covers it.
  9. Floris

    Floris Guest

    oops, i see my paste got buggered up (stupid webkit!)
    yeah it's not [...]^+


  10. AzzidReign

    AzzidReign Well-Known Member

    Since Floris's posts are removed, was the final verdict on this:
  11. infis

    infis Well-Known Member

    In check procedure regular expression is not case sensitive. It's may be bug. Consider it in the expressions.
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That expression matches strings at least 1 character long containing only alphanumeric characters and underscores.
  13. a.tushkanov

    a.tushkanov Active Member

    Help me please to collect my Regular Expression.
    I need:

    1. prohibit the CAPS (more than 2 letters consecutive), allowing the first capital letters, such as "Mary Doe" or "Catherine"
    2. prohibit any special characters such as * @ $% _- and so on. like ö ä ü é à è Ö Ä Ü É À È too
    3. prohibit all digits 0-9
    4. prohibit more than 2 consecutive identical letters
    5. prohibit consisting total less than 3 characters
    6. prohibit the kind of nickname "Ad " that is, when nick begins or ends with a space
    7. Allow all Cyrillic and Latin

    Thank you!
  14. HWS

    HWS Well-Known Member

    I am a regex specialist, but what you want is very advanced and would take some time to create and debug. If no one is willing to provide the solution for you here for free, you may think about hiring a specialist to do that. Sorry, I am not available for custom work but you may want to ask for it in the paid work forum.
  15. ClearBoth

    ClearBoth Member

    Is this going to stop Arabic characters?
  16. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member


Share This Page