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