Published
Edited
Aug 31, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
if (regex.test(str)) {
return "we found 'wood' in the string!";
}
}
Insert cell
Insert cell
matches = str.match(regex)
Insert cell
Insert cell
Insert cell
str.match(regex2)
Insert cell
Insert cell
Insert cell
str.match(regex3)
Insert cell
Insert cell
Insert cell
str.match(regex4)
Insert cell
Insert cell
Insert cell
str.replace(regex5, "nun")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
matches6 = message.match(regex6)
Insert cell
Insert cell
matches6.reduce((sum, value) => {
return sum + Number(value.slice(1));
}, 0)
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more