re = /((?i)DATE\s*(?i)AUTHOR\s*(?i)DESCRIPTION\s*)()/m
str = '/***********************************************************************************************
PROCEDURE: DEL_ABCD_Table1
PARAMETERS: Sample int
APPLICATION: ABCD
PURPOSE: Deletes all records from the Table1
NOTES:
MODIFIED
DATE AUTHOR DESCRIPTION
---------- -------------- -------------------------------------------------------------
08/08/2012 Jim Initial Version
09/25/2014 Pam Adding Canvas
09/11/2018 Dwight Adding rootbeer
12/24/2019 Angela Adding Catnip
**********************************************************************************************/ '
# Print the match result
str.scan(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