Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Regular Expressions help (wildcard search)

    need to make a regular expression that allows any character. How do I do that?

    I want j$$$$j@j$$j.com to pass this one and basically allow any character between the first and last letter in the local and domain portion.

    /^[a-z0-9]+???????[a-z0-9]+@[a-z0-9]+?????.([a-z]{2,})

    Any help would be appreciated, thanks!
    Last edited by bishork; 10-15-2008 at 02:25 PM. Reason: addendum

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Posts
    728
    Thanks
    35
    Thanked 132 Times in 123 Posts
    The dot (.) matches any character- (\S) matches any non-whitespace charater

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,033
    Thanks
    203
    Thanked 2,539 Times in 2,517 Posts
    If you are trying to create a regex to validate an email address:-

    /^([a-z0-9])([\w\.\-\+])+([a-z0-9])\@(([\w\-]?)+\.)+([a-z]{2,4})$/i



    Gordon Brown Wins On Resue Plan, But More Lies Ahead - Newspaper Headline
    Last edited by Philip M; 10-15-2008 at 05:17 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •