Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

.net 2.0 regular expression

  • 13-12-2006 4:05pm
    #1
    Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭


    \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
    

    Above is an expression to validate a given email address as being in the correct format. What I want to do now is make sure the address is at least 6 characters long as well. Any ideas?


Comments

  • Closed Accounts Posts: 884 ✭✭✭NutJob


    REF:
    [url]http://www.regular-expressions.info/reference.html[/url]
    
    {n,} where n >= 1
    
    
    Repeats the previous item at least n times. Greedy, so as many items as possible will be matched before trying permutations with less matches of the preceding item, up to the point where the preceding item is matched only n times.
    

    you will have to tweak ur expression a little

    dont look here
    http://www.regular-expressions.info/email.html :-)


    If you dont have it use this
    http://renschler.net/RegexBuilder/


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Thank for that. I get that {n,m} is going to have to go into the expression somewhere. I just can't work out where :(

    Anywho, I shall persevere ...


Advertisement