Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: capture groups are not working -- why??

by frozenwithjoy (Curate)
on Jun 05, 2013 at 19:57 UTC ( #1037290=note: print w/ replies, xml ) Need Help??


in reply to capture groups are not working -- why??

AnomalousMonk pointed out your problem, but I wanted to add a couple suggested changes to the regex for readability:

m|^Current time => (\d{4})(\d{2})(\d{2})\.(\d{2})(\d{2})(\d{2})|s

I think this helps the reader easily see the pattern of #s being matched (4-2-2-2-2-2). Also, I changed the \S to \. under the assumption that it will always be a period rather than any non-white space character.


Comment on Re: capture groups are not working -- why??
Select or Download Code
Re^2: capture groups are not working -- why??
by hiyall (Novice) on Jun 06, 2013 at 00:17 UTC

    Thank you all. I had looked at this and attempted to debug with RegexBuddy - and never saw the effect of the /x. I learned a valuable bit of knowledge today.

Reaped: Re^2: capture groups are not working -- why??
by NodeReaper (Curate) on Jun 06, 2013 at 00:17 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2014-12-19 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (70 votes), past polls