const regex = new RegExp('^\\d+\\)\\s*((?:(?:(?!^\\d+\\))[\\s\\S])*?\\n(([A-Z])\\).*)$)?[\\s\\S]*?)\\nAnswer:\\s*(\\3|FALSE)', 'gm')
const str = `10) Once a strategy has been formulated and implemented, it is important that the firm sticks to it no matter what happens.
Answer: FALSE
Explanation: Strategic leaders make decisions under conditions of uncertainty and complexity. They must carefully monitor and evaluate the progress toward key strategic objectives and make adjustments by fine-tuning any strategy as necessary.
Difficulty: 2 Medium
Topic: The Strategic Role of Managers in Strategy Formulation and Implementation
Learning Objective: 01-06 Explain the AFI strategy framework.
Bloom's: Remember
AACSB: Knowledge Application
Accessibility: Keyboard Navigation
11) Which of the following strategies does Tesla need to implement or achieve to gain a competitive advantage?
A) imitate the features of the most popular SUVs on the market
B) reinvest profits to build successively better electric automobiles
C) sell advertising space on their cars' digital displays
D) substitute less-expensive components to keep costs low
Answer: B
Explanation: As mentioned in Chapter Case 1, Tesla has consistently reinvested its profits to build successively better models of electric cars while keeping its strategy secret from competitors.
Difficulty: 2 Medium
Topic: Strategy and the Strategic Management Process
Learning Objective: 01-01 Explain the role of strategy in a firm's quest for competitive advantage.
Bloom's: Remember
AACSB: Knowledge Application
Accessibility: Keyboard Navigation`;
// Reset `lastIndex` if this regex is defined globally
// regex.lastIndex = 0;
let m;
while ((m = regex.exec(str)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === regex.lastIndex) {
regex.lastIndex++;
}
// The result can be accessed through the `m`-variable.
m.forEach((match, groupIndex) => {
console.log(`Found match, group ${groupIndex}: ${match}`);
});
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions