in reply to REGEX different on Linux & Win32!

Well, you didn't include the two results you were getting and which one you though is correct. It always helps if you tell us what you get, we're not omniscient.

Anyway, I refuse to believe this is a OS issue. But what I do believe is that's Perl version issue. Given that the code is in the file x.pl:

$ /opt/perl/5.8.0/bin/perl x.pl <<< HTML1 >>> <<< CODE1 >>> <<< HTML2 >>> <<< CODE2 >>> <<< HTML3 >>> $ /opt/perl/5.6.1/bin/perl x.pl <<< HTML1 >>> <<< CODE1 >>> <<< HTML3 >>> $ /opt/perl/5.6.0/bin/perl x.pl <<< HTML1 >>> <<< CODE1 >>> <<< HTML2 >>> <<< CODE2 >>> <<< HTML3 >>> $ /opt/perl/5.005_03/bin/perl x.pl <<< HTML1 >>> <<< CODE1 >>> <<< HTML2 >>> <<< CODE2 >>> <<< HTML3 >>>

So, it's my guess that the Linux box you tried this on has perl 5.6.1 installed, and the Windows box has either a later or an older version of Perl installed.

Abigail

Replies are listed 'Best First'.
Re: Re: REGEX different on Linux & Win32!
by gmpassos (Priest) on Feb 24, 2003 at 23:47 UTC
    Sorry, my mistake! On Win32, where is right, with Perl 5.6.1 I get:
    <<< HTML1 >>> <<< CODE1 >>> <<< HTML2 >>> <<< CODE2 >>> <<< HTML3 >>>

    On Linux, with Perl 5.6.1:

    <<< HTML1 >>> <<< CODE1 >>> <<< HTML3 >>>

    Graciliano M. P.
    "The creativity is the expression of the liberty".