This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: cygwin-perl: matching behaves weird
- From: Wardman_Michael at emc dot com
- To: V dot MIRCEVSKI at soton dot ac dot uk
- Cc: cygwin at cygwin dot com
- Date: Wed, 18 Aug 2004 07:39:44 +0100
- Subject: RE: cygwin-perl: matching behaves weird
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: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of
V.xxxxx@soton.ac.uk
Sent: Wednesday, 18 August 2004 11:49
To: cygwin@cygwin.com
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 =~ /<a href="\#"
onClick="window\.open\('(popBibTex.cfm\?.+?)',/s)
-------------
It simply does not match. I tried playing around, cuting certain suspicios
parts, and here is what I found out:
-------------
unless ($page =~ /on\Click="window\.open\('(popBibTex.cfm\?.+?)',/s)
-------------
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).
--
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/
--
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/