[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
[perl #37688] Unexpected regex failure.
# New Ticket Created by abigail@abigail.nl
# Please include the string: [perl #37688]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37688 >
This is a bug report for perl from abigail@abigail.nl,
generated with the help of perlbug 1.35 running under perl v5.8.7.
-----------------------------------------------------------------
[Please enter your report here]
#!/usr/bin/perl
use strict;
use warnings;
$_ = "A B";
print /^(.)\s+.(?(1))/ ? "match\n" : "no match\n";
print /^(.)\s+.$(?(1))/ ? "match\n" : "no match\n";
print /^(.)\s+.(?(1))$/ ? "match\n" : "no match\n";
print /^(.)\s+.$(?(1))$/ ? "match\n" : "no match\n";
print /^(.)\s.$(?(1))/ ? "match\n" : "no match\n";
__END__
match
no match
match
match
match
I would have expected that all the cases matched. This behaviour first
happened in 5.6.0, and persists in 5.9.2. With 5.005 and 5.005_04, I
get 'match' five times, as expected.
Replacing the conditional '(?(1))' with another conditional still causes
non matching of the second regex. But a different placement of $ (or an
extra $), or replacing \s+ with \s makes the regex match. Removing the
parenthesis (and replacing the conditional with another conditional that's
always true) makes that the regex matches as well.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.8.7:
Configured by abigail at Wed Jun 1 21:50:09 CEST 2005.
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
Platform:
osname=linux, osvers=2.4.18-bf2.4, archname=i686-linux-64int-ld
uname='linux alexandra 2.4.18-bf2.4 #1 son apr 14 09:53:28 cest 2002 i686 unknown '
config_args='-des -Dusemorebits -Uversiononly -Dmydomain=.abigail.nl -Dcf_email=abigail@abigail.nl -Dperladmin=abigail@abigail.nl -Doptimize=-g -Dcc=gcc -Dprefix=/opt/perl'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=define
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-g',
cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='3.0.4', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.2.5.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.2.5'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
no-syntax-warnings
defined-or
---
@INC for perl v5.8.7:
/home/abigail/Perl
/opt/perl/lib/5.8.7/i686-linux-64int-ld
/opt/perl/lib/5.8.7
/opt/perl/lib/site_perl/5.8.7/i686-linux-64int-ld
/opt/perl/lib/site_perl/5.8.7
/opt/perl/lib/site_perl/5.8.6/i686-linux-64int-ld
/opt/perl/lib/site_perl/5.8.6
/opt/perl/lib/site_perl/5.8.5/i686-linux-64int-ld
/opt/perl/lib/site_perl/5.8.5
/opt/perl/lib/site_perl/5.8.4/i686-linux-64int-ld
/opt/perl/lib/site_perl/5.8.4
/opt/perl/lib/site_perl/5.8.3/i686-linux-64int-ld
/opt/perl/lib/site_perl/5.8.3
/opt/perl/lib/site_perl/5.8.2/i686-linux-64int-ld
/opt/perl/lib/site_perl/5.8.2
/opt/perl/lib/site_perl/5.8.1/i686-linux-64int-ld
/opt/perl/lib/site_perl/5.8.1
/opt/perl/lib/site_perl/5.8.0/i686-linux-64int-ld
/opt/perl/lib/site_perl/5.8.0
/opt/perl/lib/site_perl
.
---
Environment for perl v5.8.7:
HOME=/home/abigail
LANG=C
LANGUAGE (unset)
LD_LIBRARY_PATH=/home/abigail/Lib:/usr/local/lib:/usr/lib:/lib:/usr/X11R6/lib
LOGDIR (unset)
PATH=/home/abigail/Bin:/opt/perl/bin:/usr/local/bin:/usr/local/X11/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/games:/usr/share/texmf/bin:/opt/Acrobat/bin:/opt/java/blackdown/j2sdk1.3.1/bin:/usr/local/games/bin
PERL5LIB=/home/abigail/Perl
PERLDIR=/opt/perl
PERL_BADLANG (unset)
SHELL=/bin/bash
- Follow-Ups from:
-
andreas.koenig.gmwojprw@franz.ak.mind.de (Andreas J. Koenig)
hv@crypt.org
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]