a = ['This is some sample text',
'This is some sample text',
'This is some sample text']
so a is an example of an array, and then loop through the array and replace the value
a.each do |s|
s.gsub!('This is some sample text', 'replacement')
end
source
share