Might something like this be helpful?
c:\@Work\Perl\monks>perl -wMstrict -le "my $look_for = qr{ (?<! [[:alpha:]]) home (?! [[:alpha:]]) }xms; ;; my $row = 'social_going_home'; my $match = my ($capture) = $row =~ m{ (?<= _) $look_for \z }xmsg; ;; if ($match) { print qq{match, captured '$capture'}; } " match, captured 'home'
Update: BTW: The pattern feed* in the match of if(/feed*/) { ... } matches any of fee feed feedd feeddd ... Is that what you wanted?
Give a man a fish: <%-{-{-{-<
In reply to Re^3: perl system command
by AnomalousMonk
in thread perl system command
by cbtshare
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |