Finding your match with Ruby
subject = (/^Subject\: (.+)$/).match(email)[1]
Prior to this code I would have used the following:
email[/^Subject\: (.+)$/] subject = $1
Reference: Ruby SMTP Server - Save to Database [dzone.com]
DZone Snippets > jrobertson > backreference
11381 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
James Robertson http://www.r0bertson.co.uk
subject = (/^Subject\: (.+)$/).match(email)[1]
email[/^Subject\: (.+)$/] subject = $1