http://www.perlmonks.org?node_id=898415


in reply to Re: Quick Regex quesiton
in thread Quick Regex quesiton

I just did that as an example. I want to capture what follows. So it would be deferred gross profit blah blah. blah blah. blah. So I want to capture the rest.And I don't know how :(

Does this work?

<code> if ($test=~m/(deferred|gross)(.*)(\.)(.*)(\.)(.*)(\.)) { print "$1, $2, $4, $6"; }

Or is there a more elegant way to do it?

Thank you so much :)