Paste this into the Ruby syntax: { name = "string.here-doc.ruby"; begin = "(?=<<(\\w+))"; end = "^\\1"; } It's behaving as though the capture doesn't exist. Chris