<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Use regex to extract words from the sentence 'Some of my favorite words are pencil, dinosaur, and coffee.'
<|im_end|>
<|im_start|>assistant
var words = 'Some of my favorite words are pencil, dinosaur, and coffee.';
var result = words.match(/[a-zA-Z]+/g);
console.log(result);
// Result: ["Some", "of", "my", "favorite", "words", "are", "pencil", "dinosaur", "and", "coffee"]<|im_end|>
