in reply to How do I extract the data that comes after a certain word?
Why use Perl $POSTMATCH or $'. when you can easily do like so:
my $string='hello I went to the store yesterday and the day after an +d the day after'; if($string=~m/.+?(yesterday.+?after).+?$/i){ print 'Summary: ',$1,$/; ## print yesterday and the da +y after }
Please check the following for some details.
perldoc -v $`
perldoc -v $&
perldoc -v $'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I extract the data that comes after a certain word?
by MiriamH (Novice) on Jun 19, 2012 at 14:58 UTC |