Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

RE: codem/(?:-x pattern) #comment /x bug?/code

by Shendal (Hermit)
on Sep 08, 2000 at 00:08 UTC ( #31468=note: print w/ replies, xml ) Need Help??

in reply to codem/(?:-x pattern) #comment /x bug?/code

Tried your code with perl 5.6 (activestate build), and it works like a champ.

Output: PATTERN=m/(?-x:(abcdef))/x ANSWER = abcdef PATTERN=m/(?-x:(abcdef)) # comment here/x ANSWER = abcdef


Comment on RE: codem/(?:-x pattern) #comment /x bug?/code
Download Code
Replies are listed 'Best First'.
RE: RE: codem/(?:-x pattern) #comment /x bug?/code
by Fastolfe (Vicar) on Sep 08, 2000 at 00:15 UTC
    I tried this with 5.00551 on Solaris 2.6 (egcs 2.91.57) and it failed on the 2nd pattern like the original poster. At first it seemed like the (?-x:...) bit was negating the x flag for the entire regexp, but I tried adding the comment to the pattern and it still failed to match, so I'm not sure. Very odd.

    Like another poster, I was thinking that the end of the regexp being on the same line as the comment was causing the /x to be ignored (interpreted as part of the comment), but adding whitespace in there caused the pattern to fail in both cases (odd). Something isn't right.

RE: RE: codem/(?:-x pattern) #comment /x bug?/code
by dcorbin (Sexton) on Sep 08, 2000 at 00:13 UTC
    Sounds like a bug that's been fixed then.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://31468]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2015-11-26 07:22 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (696 votes), past polls