我有以下字符串:
const text = '01. is simply dummy text of the printing. 02. It is a long established fact that a reader will be. 03. and web page editors now use Lorem Ipsum.';
我需要将其解析为以下数组列表:
[
'01. is simply dummy text of the printing.',
'02. It is a long established fact that a reader will be.',
'03. and web page editors now use Lorem Ipsum.'
]
我已经尝试过这种方法,但是没有得到想要的结果:
const list = text.match(/\d+.\s(.*)./g);
[
'01. is simply dummy text of the printing. 02. It is a long established fact that a reader will be. 03. and web page editors now use Lorem Ipsum.'
]
请您帮我解决这个问题。