Online
 
Friday, 09 January 2009
 
 
More article:
Related Content:

Limitations of the Basic Syntax
 
Article Index
Limitations of the Basic Syntax
Page 2
Page 3
Page 4

[A-Za-z0-9_]+@[A-Za-z0-9_]+\.[A-Za-z0-9_]{2,4}

Naturally, you may want to allow only email addresses that have a three-letter domain (such as .com). This can be accomplished by omitting the comma and max parameters from the length specifiers:

[A-Za-z0-9_]+@[A-Za-z0-9_]+\.[A-Za-z0-9_]{3}

If, on the other hand, you would like to leave the maximum number of characters open in anticipation of the fact that longer domain extensions may be introduced in the future, you could use the following regex:

[A-Za-z0-9_]+@[A-Za-z0-9_]+\.[A-Za-z0-9_]{3,}

This indicates that the last regex in the expression should be repeated at least a minimum of three times, with no fixed upper limit.



Tags: Add more tags...,
This entry was posted on . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a comment. Tags: Simple PHP, Pear, Easy PHP, PHP Tutorial, PHP MySQL, XSLT, Sap Tutorial, CSS Tutorial, XSL FO Java, SQL Tutorial.
Users' Comments (0)

Comment an article
  Name
  E-mail
   Title
Available characters: 4000
 Notify me of follow-up comments
This image contains a scrambled text, it is using a combination of colors, font size, background, angle in order to disallow computer to automate reading. You will have to reproduce it to post on my homepage
Enter what you see:

No comment posted

Your Ad Here
Mobile Wallpaper 24
Statistic


Last Post

 
Top! Top!