A pot
Rosemary
A pot
Rose
A pot
Primrose
A pot
Rice
A pot
RoseOfSharon
A pot
ChristmasRose
12345
let garden = [
	"Rosemary", "Rose", "Primrose", "Rice", 
	"Rose-of-Sharon", 
	"Christmas Rose"
];
123456
for  (const plant of garden) {
if (plant.match(//i) {
cut(plant);
}
}
Lesson 7 / 42

Lesson task •

Cut just "rose", without cultivars

Cover full string

^...$

Here is a trick: to force your regexp to be compared against full string but not it’s substrings, enclose your regexp between ^ and $
1234
console.log(!!"foo bar".match(/^foo bar$/)) // true 
console.log(!!"foo bar baz".match(/^foo bar$/)) // false 
console.log(!!"^foo bar$".match(/^foo bar$/)) // false 
console.log(!!"^foo bar$".match(/\^foo bar\$/)) // true