Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: capture optional text

by Lotus1 (Priest)
on May 18, 2017 at 14:40 UTC ( #1190538=note: print w/replies, xml ) Need Help??


in reply to Re: capture optional text
in thread capture optional text

I like the idea of the zero or more match, (.*), inside the capture to make it match even if the comment isn't there. Thanks.

Replies are listed 'Best First'.
Re^3: capture optional text
by KurtZ (Friar) on May 18, 2017 at 16:23 UTC
    It will also match "malformed" comments without a leading #.

      I read it that the #'s are optional, so it's not really "malformed", although no test case for this was provided :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2018-08-20 14:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (191 votes). Check out past polls.

    Notices?