Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-15-2008, 01:11 PM   PM User | #1
bishork
New to the CF scene

 
Join Date: Oct 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
bishork is an unknown quantity at this point
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
bishork is offline   Reply With Quote
Old 10-15-2008, 03:22 PM   PM User | #2
mrhoo
Regular Coder

 
Join Date: Mar 2006
Posts: 710
Thanks: 31
Thanked 128 Times in 119 Posts
mrhoo will become famous soon enoughmrhoo will become famous soon enough
The dot (.) matches any character- (\S) matches any non-whitespace charater
mrhoo is offline   Reply With Quote
Old 10-15-2008, 05:03 PM   PM User | #3
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,103
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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..
Philip M is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:59 AM.


Advertisement
Log in to turn off these ads.