What =S.G means in JS regular expression

Source: Internet
Author: User

G is a global match
The middle content means: match with = switch, followed by 0 or more spaces, and then any character enclosed in double quotes, such as:
= "Any symble"


The

= "ASFJASKLDFJASKLJDFL"

= "Afasdfasdcxx"

This regular meaning matches the equal sign space any quotation mark any character 0 times or multiple quotes/g means that the global match is used in JS with a similar replaceall () effect.

The two strings like above are all possible.

\s
Matches any whitespace character, including spaces, tabs, page breaks, and so on. equivalent to [\f\n\r\t\v].
*
Matches the preceding subexpression 0 or more times. For example, zo* can match "z" and "Zoo". * Equivalent to {0,}.
\
Marks the next character as a special character, or a literal character, or a backward reference, or an octal escape. For example, ' n ' matches the character "n". ' \ n ' matches a line break. The sequence ' \ \ ' matches "\" and "\ (" Matches "(".
.
Matches any single character except "\ n". To match any character including ' \ n ', use a pattern like ' [. \ n] '.
?
Matches the preceding subexpression 0 or one time. For example, "Do (es)?" can match "do" in "do" or "does".? Equivalent to {0,1}

What =S.G means in JS 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.