I want to parse a logfile which has 3 entries. It looks like this:
Start: foo
Parameters: foo
End: foo
Start: other foo
Parameters: other foo
End: other foo
....
The foo is what I want. It would be nice if the result looks like this:
logs = [
{
:start=>"foo",
:parameters=>"foo",
:end=>"foo"
},
{
:start=>"other foo",
:parameters=>"other foo",
:end=>"other foo"
}
]
I know some regex, but it’s hard for me to understand how I to this over multiple lines.
Thanks!
1 Answer