我在 ruby 中有以下文本,我只想提取 ---- 和 ---- (内容)之间的部分,但我无法做到这一点,我尝试使用正则表达式:
mystring.match(/^-*(.*?)^-*/m)[1]
这是文本:
Congrats! You just got a new contact lead
Here's the information your contact submitted:
------------------------------------------------------------------------------------
Name: testing
Email: test123@gmail.com
Mensaje: hello
this is a nice test
------------------------------------------------------------------------------------
For your convenience, we have automatically added this contact and message to your account.
Best of luck!
- LeadABC