the following code:

        my (@main);
        $_="
        From a
        From: b
        From: c
        From: d
        ";
        @main = /From [^\n]*?\n.*?(From: .*?\n).*?/gx;
        print "@main";
        print "------------------------------\n";
        @main =         /From [^\n]*?\n.*?(From: .*?\n).*?/g;
        print "@main";

produces:

        From: b
         From: d
        ------------------------------
        From: b

the only difference between the two regex lines is the 'x' after '/g' in the 
first of the two regex lines.

thanks,

tom arnall
north spit, ca



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to