in reply to Re^2: search for exact string
in thread search for exact string

This will find a case-insensitive "sTRinG" followed by whitespace, even if the string is at the end of the line:
#!/usr/bin/env perl use warnings; use strict; my $toFind = 'String'; while (<DATA>) { print if /\b$toFind\s/i; } __DATA__ this is a string strings are us String.c is a file so string.o is too I like a good STRING now and again

This prints:

this is a string I like a good STRING now and again