JavaScript-Regular expression doubts

Source: Internet
Author: User

Regular Expression Manual:

Http://tool.oschina.net/uploads/apidocs/jquery/regexp.html

Regular expression Test address:

http://tool.chinaz.com/regex/

Let's give an example: E-mail

[Email protected]

1.username (example)

([a-z0-9_\.-]+)

[Email protected]

@

3. Company Name (qq.com)

([\da-z\.-]+) \. ([A-z\.] {2,6})

4.^ Match start position!

5.$ Match End Position!

6.[A-ZA-Z] Representative Range

7.{3,16} stands for length

Finally, we correspond to the regular manual, the following regular expression will appear (please remember a word, complex is composed of simple)

/^ ([a-z0-9_\.-]+) @ ([\da-z\.-]+) \. ([A-z\.] {2,6}) $/

JavaScript-Regular expression doubts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.