in reply to Quick Regex quesiton

What are those three sentences you want to capture ? As, I understand, "deferred gross profit is blah blah blah." is sentence number 1. What are sentences 2 and 3 ?

Replies are listed 'Best First'.
Re^2: Quick Regex quesiton
by eversuhoshin (Sexton) on Apr 08, 2011 at 18:08 UTC

    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 :)

      Your code doesn't work ! (.*) seems to consider real full stop (.) as any-character.

      btw wind's code works !