📌  相关文章
📜  在rails中的两个字符串正则表达式之间查找字符串 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:37.385000             🧑  作者: Mango

代码示例1
input_string = "blahblahblahSTARTfoofoofooENDwowowowowo"
str1_markerstring = "START"
str2_markerstring = "END"

input_string[/#{str1_markerstring}(.*?)#{str2_markerstring}/m, 1]
#=> "foofoofoo"