re = / \r?\n {24}/
str = 'RAW DATA
26/11/15 26/11/15 1314 NEFT : CMS364134568 - CRE
DIT CARD OPERATIONS
26/11/15 26/11/15 1314 Cash Deposit
27/11/15 27/11/15 1314 NEFT : CMS364860637 - CRE
DIT CARD OPERATIONS
27/11/15 27/11/15 1314 Cash Deposit
30/11/15 30/11/15 1314 NEFT : CMS365476895 - CRE
DIT CARD OPERATIONS
30/11/15 30/11/15 1314 NEFT : CMS365573866 - CRE
DIT CARD OPERATIONS
30/11/15 30/11/15 1314 NEFT : CMS365623059 - CRE
DIT CARD OPERATIONS'
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