in reply to Re^2: perl system command
in thread perl system command
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: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: perl system command
by cbtshare (Monk) on Nov 10, 2016 at 16:04 UTC | |
by AnomalousMonk (Archbishop) on Nov 10, 2016 at 19:37 UTC |