Skip to the content.

Regular Expressions, references

Exercises and the most interesting parts

Flag Description Corresponding property
d Generate indices for substring matches. RegExp.prototype.hasIndices
g Global search. RegExp.prototype.global
i Case-insensitive search. ` RegExp.prototype.ignoreCase`
m Multi-line search. RegExp.prototype.multiline
s Allows . to match newline characters. RegExp.prototype.dotAll
u “unicode”; treat a pattern as a sequence of unicode code points. RegExp.prototype.unicode
y Perform a “sticky” search that matches starting at the current position in the target string. See sticky. RegExp.prototype.sticky