re = /=+|GOLIATH/
str = '=====================================================================================
GOLIATH
=====================================================================================
*** GOLIATH BACKUP CHECK *** GOLIATH BACKUP CHECK *** GOLIATH BACKUP CHECK ***
====]] GOLIATH Backup Check Results [[====
--] Remote Reachability Test
Pings were NOT successful to 172.16.158.1 from remote router uscmcraudfl04r.
USCMCRAUDFL04R#ping 172.16.158.1 source FastEthernet0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.158.1, timeout is 2 seconds:
Packet sent with a source address of 172.16.112.1
.....
Success rate is 0 percent
--] Backup Device Test
GOLIATH did not detect any backup devices connected to the router.
--] Back-to-Back Test
No SMARTS Back-to-Back connections detected.
GOLIATH did not detect any iBGP connections for this device.
--] ISDN Test
No ISDN interfaces detected on router or B2B routers.
====================================================================================='
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