2
删除YAML头如何删除YAML头这样一个从文本文件在Ruby中:从降价文件
---
date: 2013-02-02 11:22:33
title: "Some Title"
Foo: Bar
...
---
(YAML的是由三个破折号(包围 - ))
我试着
text.gsub(/---(.*)---/, '') # text is the variable which contains the full text of the file
但它没有工作。