Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Problems with formatting the results of my regex

by superwombat (Initiate)
on Jul 07, 2012 at 06:38 UTC ( #980447=note: print w/ replies, xml ) Need Help??


in reply to Re: Problems with formatting the results of my regex
in thread Problems with formatting the results of my regex

Fantastic! Thanks for the quick response. I tested the new code and it's working perfectly now. I still can't understand why the \r was getting captured in $2, since that portion supposedly should end with \d* zero or more digits. In any case, I'm glad it's fixed now.


Comment on Re^2: Problems with formatting the results of my regex
Re^3: Problems with formatting the results of my regex
by monsoon (Pilgrim) on Jul 07, 2012 at 06:46 UTC
    .? in (\-?\d+.?\d*) matched \r

      Yes, most (all?) of those . characters in the regex should be changed to \. so that they match just "." not /[^\n]/. You can also use [.]

      - tye        

        Provided sample line has only 1 literal . character in it. I think only this part (\d+ \d+:\d+:\d+.\d+) and perhaps this one (\-?\d+.?\d*) (if it really meant to match floating point numbers) can have . character replaced with \. but not the other two.
      Ah.... That's part of my problem then. I intended .? to mean literally "zero or one decimal points" That was a rookie mistake.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2014-10-30 23:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (211 votes), past polls