给定如下文本:
body =
yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada yada
< via mobile device >
Yada Yada <xxxxx@xxxxx.com> wrote:
yada yada yada yada yada yada yada yada yada
我想匹配第二段,所以我在做:
body = body.split(/.* <xxxxx@xxxxx.com> wrote: .*/m).first
但这在 ruby 中并不匹配,即使它在 Rubular 中也是如此。任何想法为什么?谢谢