私はルビーに次のテキストを持っています、私は----と----(コンテンツ)の間の部分だけを抽出したいのですが、それを行うことができません、私は使用して正規表現で試しました:
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