JavaScript Regular Expressions

Source: Internet
Author: User

This fairy is planning a weight loss issue recently.

Then the goose ate two nights of fruit and vegetables and gave up fighting.

It's too much.

<-----------------------------------honey Juice Split Line----------------------------------->

Why does the regular expression exist when we are talking about the matter?

I think it's because computers don't understand people's minds!

For example, you want a beautiful penguin, the computer must not know what is the penguin, will give you some messy things,

So straight male cancer will be very annoyed, to give him some rules, tell him want the Penguin number form:

"The first is not 0 ah, must be 5-12 Ah, but also want the refill 520 ah what what?"

The computer immediately smart up, as early as said do not know, go to the text to find it!

I. Defining the Regular

1. Literal form

Start and end with a slash (/)

var /w1569178479/   / / computer says Welcome to Mud Meng Plus my satellite number

2.REGEXP Constructors

var New RegExp (' w1569178479 ')  // The second parameter can be accepted, followed by a

<emmm ... Just write these two words to move back to the company from the Bureau >

JavaScript Regular expression

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.