develooper Front page | perl.perl5.porters | Postings from May 2004

[perl #29538] Weird regex behaviour

Thread Next
From:
Til Schubbe
Date:
May 13, 2004 03:28
Subject:
[perl #29538] Weird regex behaviour
Message ID:
rt-3.0.9-29538-87310.6.72801110403121@perl.org
# New Ticket Created by  Til Schubbe 
# Please include the string:  [perl #29538]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=29538 >


This is a bug report for perl from til@schubbe.org,
generated with the help of perlbug 1.35 running under perl v5.8.4.


-----------------------------------------------------------------
[Please enter your report here]

til@debian:~ - perl -e 'if ("a1" =~ m/(^|\D)(?=\d)1/) {print "1\n"} else
{print "0\n"}'
0
til@debian:~ - perl -e 'if ("a1" =~ m/(^|\D)(?=\d)1/i) {print "1\n"} else
{print "0\n"}'
1

The 1. expression should be true, but it isn't. This behaviour changes
when I add the 'i'-modifier.

The bug exists in v5.8.3 and v5.8.2, too.

Regards
Til

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl v5.8.4:

Configured by inst at Wed May 12 21:53:09 CEST 2004.

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
  Platform:
    osname=linux, osvers=2.4.26, archname=i686-linux
    uname='linux debian 2.4.26 #23 fr apr 30 19:16:33 cest 2004 i686 gnulinux '
    config_args='-de'
    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=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.3.2 (Debian)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.2'
  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:
    

---
@INC for perl v5.8.4:
    /usr/local/lib/perl5/5.8.4/i686-linux
    /usr/local/lib/perl5/5.8.4
    /usr/local/lib/perl5/site_perl/5.8.4/i686-linux
    /usr/local/lib/perl5/site_perl/5.8.4
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.8.4:
    HOME=/home/til
    LANG=de_DE@euro
    LANGUAGE (unset)
    LC_CTYPE=de_DE@euro
    LC_MESSAGES=C
    LD_LIBRARY_PATH=/usr/local/qt/lib:/usr/local/lib
    LOGDIR (unset)
    PATH=.:/home/til/bin:/usr/local/qt/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About