my $string = < 1)Lifo 2)Depreciation 3)Expenses STATEMENT if( $string =~ m/(.*)Significant\s+Accounting\s+Policies\b(.*)$/m ) { print "Found stuff: $2\n"; } else { print "Match failed\n"; };