从Ruby中的一个长字符串中提取字符串
我有一个很长的字符串,我想以列表的形式从中提取特定的字符串 字符串:从Ruby中的一个长字符串中提取字符串,ruby,Ruby,我有一个很长的字符串,我想以列表的形式从中提取特定的字符串 字符串: [#<User id: 1, login: "test", hash ... ] [# string.scan(/login: "(.*?)",/)
[#<User id: 1, login: "test", hash ... ]
[#
string.scan(/login: "(.*?)",/)