A pot
AppleGalaMust696
A pot
Rosemary
A pot
CornPioneer3751
A pot
ChristmasRose
A pot
SnowOnTheMountain
A pot
WheatNorin10
A pot
RoseOfSharon
12345678
let garden = [
	"Apple 'Gala Must 696'", 
	"Rosemary", "Corn 'Pioneer 3751'", 
	"Christmas Rose", 
	"Snow-on-the-Mountain", 
	"Wheat 'Norin 10'", 
	"Rose-of-Sharon"
];
123456
for  (const plant of garden) {
if (plant.match(//i) {
cut(plant);
}
}
Lesson 21 / 42

Lesson task •

Cut plants which names doesn't contain "'" and no digits

Single character not from a custom symbol class

[^...] again

Matches single character NOT from the specified range of symbols

Now we can craft the rest of predefined symbol classes from the previous lessons:

  • \W equals to [^A-Za-z0-9_]
  • \S equals to [^ \t\n\r\f]
  • \D equals to [^0-9]