eversuhoshin has asked for the wisdom of the Perl Monks concerning the following question:
Hello dear monks~
I have a very quick question. I am looking for accounting policies and I would like to take the following three sentences after following the match.
Here is my code.
my $test='deferred gross profit is blah blah blah.'; if($test=~m/(\bdeferred|unrealized)(.*)(\.)/) { print "matched $1 and the rest is $2"; }
This code captures only the first sentence. How can I modify the code so I capture the next three sentences?
Thank you for your time and consideration
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Quick Regex quesiton
by wind (Priest) on Apr 08, 2011 at 18:03 UTC | |
|
Re: Quick Regex quesiton
by JavaFan (Canon) on Apr 08, 2011 at 23:15 UTC | |
|
Re: Quick Regex quesiton
by jethro (Monsignor) on Apr 08, 2011 at 18:07 UTC | |
|
Re: Quick Regex quesiton
by chakreey (Acolyte) on Apr 08, 2011 at 17:59 UTC | |
by eversuhoshin (Sexton) on Apr 08, 2011 at 18:08 UTC | |
by chakreey (Acolyte) on Apr 08, 2011 at 18:17 UTC |