草庐IT

Scotland

全部标签

ruby - 希望正则表达式在第一次出现 "."和 ";"时停止

我正在尝试从段落中提取句子到,模式如下Current.timeissixthirtyatScotland.Past.timewasfivethirtyatIndia;Current.timeisfivethirtyatScotland.Past.timewasfivethirtyatScotland.Current.timeisfivetenatScotland.当我将正则表达式用作/current\..*scotland\./i这匹配所有字符串Current.timeissixthirtyatScotland.Past.timewassixthirtyatIndia;Current.