Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Wed, 18 Aug 2004 10:35:39 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Wardman_Michael AT emc DOT com cc: V DOT MIRCEVSKI AT soton DOT ac DOT uk, cygwin AT cygwin DOT com Subject: RE: cygwin-perl: matching behaves weird In-Reply-To: <382C684D2347FA4DADFC2D3EA70268F126EA54@ausy1mx2.corp.emc.com> Message-ID: References: <382C684D2347FA4DADFC2D3EA70268F126EA54 AT ausy1mx2 DOT corp DOT emc DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 Good guess, but the original RE didn't support any variations of whitespace, so it wouldn't have matched a multi-line string anyway... However, if the OP didn't provide the exact RE he used, he could try setting PERLIO=crlf in his environment and see if that helps. One thing that he may also be missing is that the '/s' flag will retain all the characters, even though it runs the RE over one string, so that string may (and usually will) contain newlines, which have to be accounted for in the RE. Igor P.S. Oh, and , even the list address. Thanks. On Wed, 18 Aug 2004, Wardman_Michael wrote: > I wonder if the "/s" on the end is getting a newline problem somewhere? > > This might explain the Windows vs. Cygwin behaviour, as they can be > configured to have different line endings. > > I've had to modify a lot of scripts to run under Cygwin by adding: > xxxx | tr -d '\r' > > -----Original Message----- > From: V DOT xxxxx AT xxxxx DOT xx DOT xx > Sent: Wednesday, 18 August 2004 11:49 > To: cygwin AT xxxxxx DOT xxx > Subject: cygwin-perl: matching behaves weird > > Now, this may be old news for many of you, but I'm new to cygwin, so please > don't shoot. I'd be happy if someone would post me a link to the solution. > > I'm doing quite strightforward matching using regular expressions in > perl (as you can see below) and the code used to work just fine on the > ActiveState perl, but behaves very strange with cygwin Perl: > > ------------- > unless ($page =~ / ------------- > > this does match. (notice the \ before C) > > What's up? (::confused;) > > I'm runing Win_XP_Pro/SP2, just installed Cygwin (and all > tools/packages/modules that were available through the web install utility). -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Happiness lies in being privileged to work hard for long hours in doing whatever you think is worth doing." -- Dr. Jubal Harshaw -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/