JS Built-ins
RegExpmultilinebeginner

RegExp multiline β€” result is boolean

πŸ“– Usage Example
const re = /^start/m
console.log(re.multiline) // β†’ true
// ^ and $ match at line boundaries

Read RegExp.multiline to check whether the 'm' flag is set on the regular expression.

RegExp.prototype.multiline

Confirm that multiline is strictly a boolean.

Challenge: Verify that /pattern/m.multiline === true.

πŸ’‘ Hints (1)
  • β€’ multiline returns a strict boolean value