#!/usr/local/bin/perl -w use strict; LINE: while ( ) { $_ .= while /<(B|Bl|Blu|Blue|Blueb|Bluebi|Bluebird)$/; next LINE if (m/\.{4}/s .. /(\+\=\+)$/); print; } __END__ (Example 1) This is Example 1 This is some text...... MBAAAEgAAAQAB blaah,blaah =+=+=+=+=+=+=+=+=+=+=+ (Example 2) but sometimes it looks like this: This is some text......MBAAAEgAAAQAoBA AAQKAREDSCETRTBDFS blaah,blaah =+=+=+=+=+=+=+=+=+=+=+ (Example 3) This is designed to break it ha ha this will make trouble This is some text......MBAAAEgAAAQAoBA AAQKAREDSCETRTBDFS blaah,blaah =+=+=+=+=+=+=+=+=+=+=+