Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by Shendal (Hermit)
on Sep 08, 2000 at 00:08 UTC ( [id://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

Cheers,
Shendal

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-28 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found