http://www.perlmonks.org?node_id=1037290


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.

Replies are listed 'Best First'.
Re^2: capture groups are not working -- why??
by hiyall (Acolyte) 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.