Loading lesson path
Concept visual
Start at both ends
(Deprecated) constructor Returns the function that created the RegExp prototype dotAll
flag is set in the expression (new in 2018) escape() Returns a string where characters that belongs to the regular expression syntax are escaped (new in 2025) exec() Returns a result array for a matches in a string flags
(new in 2015)
globalflag is set in the expression hasIndices
flag is set (new in 2022) ignoreCase
flag is set lastIndex Specifies the index at which to start the next match multiline
modifier is set source Returns the text of the RegExp pattern sticky
flag is set (new in 2015) test() Tests for a match in a string. Returns true or false toString() Returns the string value of the regular expression unicode
flag is set (new in 2018) unicodeSets
flag is set (new in 2023)
Returns an Iterator of results replace(regexp, s) Returns a new String replaceAll(regexp, s)
Returns the index of the first match split(regexp)