re = /\ndescription:\s*([^]*)/
str = 'assignment_group: 1a29e044a527e100cd783922e1e94efb
short_description: Short text .....goes here
description: Long text goes here, line 1
and here is line 2
and line 3
right until the end - line 4
'
# Print the match result
str.match(re) do |match|
puts match.to_s
end
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Ruby, please visit: http://ruby-doc.org/core-2.2.0/Regexp.html