re = /^(\d+)\. ?(.+?)(?:value|vlaue|balue|valie): ?(.+?)[\n\r]{2,}/m
str = 'Some junk data
More junk data
1. fairly long key, all on one line
value: some other text with spaces and stuff
Some junk data
More junk data
2. hey look! another long
and broken key. on two lines
value: a different value with some different information
Some junk data
More junk data
3. hey look! another long line. on a line
value: a different value
broken, with some different information
Some junk data
More junk data '
subst = ''
result = str.gsub(re, subst)
# Print the result of the substitution
puts result
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