Find and Replace with String or RegEx
The simplest replacement is substituting one string for another with ` .replaceAll() `
js
const original = "the quick brown fox"
const updated = original.
results start
This can also be done with a regular expression
TODO : See also : [TODO: Code shorthand span ] which only does one
This is an example using a regex. You can also use a string. TKTKTK make more examples including ones with functions and strings
js
const regex = /\d+s/g
const original = "There are 1000s and 1000s of corgis"
const updated = original.
results start
More here : https : //developer.mozilla.org/en - US/docs/Web/JavaScript/Reference/Global _ Objects/String/replace