JS: Regex Functions
Here is a overview of regex functions.
str.search(regex)
- Return the position of the match. [see String.prototype.search]
str.match(regex)
- Return all occurrences (if regex has g flag) or captured groups (if regex has no g flag). [see String.prototype.match]
str.matchAll(regex)
- Return all occurrences and captures. [see String.prototype.matchAll]
str.replace(regex, rep)
- Return a new string. [see String.prototype.replace]
str.replaceAll(regex, rep)
- Return a new string. [see String.prototype.replaceAll]
regex.test(str)
- Return true/false. [see RegExp.prototype.test]
regex.exec(str)
- Return captured groups. [see RegExp.prototype.exec]
JavaScript, String
- JS: String Overview
- JS: Quote String
- JS: Template String
- JS: String Escape Sequence
- JS: Unicode Escape Sequence
- JS: String Operations
- JS: Iterate String
- JS: String Code Unit
- JS: Count Chars in String π
- JS: Tagged Template String
- JS: Regex Functions
- JS: Convert String, Number
- JS: String Object
- JS: String Constructor
- JS: String.prototype
JavaScript, Regular Expression
- JS: RegExp Tutorial
- JS: Regex Functions
- JS: RegExp Syntax
- JS: RegExp Flag
- JS: Regex Replace String Dollar Sign
- JS: Regex Replace Function Args
- JS: RegExp Object
- JS: RegExp Constructor
- JS: RegExp.prototype
- JS: String.prototype.search
- JS: String.prototype.match
- JS: String.prototype.matchAll
- JS: String.prototype.replace
- JS: String.prototype.replaceAll
- JS: RegExp.prototype.test
- JS: RegExp.prototype.exec