Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Regex to ignore comment

by Laurent_R (Canon)
on Oct 20, 2015 at 17:18 UTC ( [id://1145462]=note: print w/replies, xml ) Need Help??


in reply to Regex to ignore comment

I am not sure that I understand what you're trying to do, but the simplest way to include comments in a regex is to use the /x modifier: anything in your regex from the (unescaped) # to the end of the line will be a comment.

Otherwise, you might also use the (?#comment) construct, but, frankly, the /x modifier is more practical.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-03-29 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found