...

View Full Version : Regular Expressions help (wildcard search)



bishork
10-15-2008, 02:11 PM
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!

mrhoo
10-15-2008, 04:22 PM
The dot (.) matches any character- (\S) matches any non-whitespace charater

Philip M
10-15-2008, 06:03 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum