1const string = "hello world 123";
2
3// remove all o's from the string
4string.replace(/o/g, "") // "hell wrld 123"
5
6// remove all letters from the string
7string.replace(/[A-Za-z]/g, "") // " 123"
8
9// remove all digits from the string
10string.replace(/\d/g, "") // "hello world "