说我正在使用以下字符串:
"I know an old lady who swallowed a fly.
I don't know why she swallowed the fly. Perhaps she'll die.
I know an old lady who swallowed a spider.
It wriggled and jiggled and tickled inside her."
我试图根据新行和额外的空间将它们拆分成数组,尝试正则表达式没有用,有什么建议吗?
["I know an old lady who swallowed a fly", "I don't know why she swallowed the fly. Perhaps she'll die.","I know an old lady who swallowed a spider.", "It wriggled and jiggled and tickled inside her."]