MiriamH has asked for the wisdom of the Perl Monks concerning the following question:
This printed the entire string. I used the $' function, but it took too much data. How do I limit it?$String = "hello I went to the store yesterday and the day after and +the day after"; if ($String =~ /yesterday/i) { until ($String =~ /after/i) { print "Summary: $'" } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I extract the data that comes after a certain word?
by ikegami (Patriarch) on Jun 18, 2012 at 19:55 UTC | |
|
Re: How do I extract the data that comes after a certain word?
by tobyink (Canon) on Jun 18, 2012 at 19:34 UTC | |
|
Re: How do I extract the data that comes after a certain word?
by 2teez (Vicar) on Jun 18, 2012 at 19:46 UTC | |
by MiriamH (Novice) on Jun 19, 2012 at 14:58 UTC |