#!/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
In reply to Re^3: search for exact string
by toolic
in thread search for exact string
by gfarhat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |