scrimba
Learn Regex
Find More Than the First Match
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Find More Than the First Match
AboutCommentsNotes
Find More Than the First Match
Expand for more info
index.js
run
preview
console
let testStr = "Repeat, Repeat, Repeat";
let ourRegex = /Repeat/;
testStr.match(ourRegex);

let twinkleStar = "Twinkle, twinkle, little star";
let starRegex = /change/;
let result = twinkleStar;

console.log(result);
Console
index.html
-1:39