Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by monsoon (Pilgrim)
on Jul 07, 2012 at 06:46 UTC ( #980448=note: print w/replies, xml ) Need Help??


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

.? in (\-?\d+.?\d*) matched \r

Replies are listed 'Best First'.
Re^4: Problems with formatting the results of my regex (\.)
by tye (Sage) on Jul 07, 2012 at 07:16 UTC

    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.
Re^4: Problems with formatting the results of my regex
by superwombat (Novice) on Jul 07, 2012 at 08:11 UTC
    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://980448]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2016-12-05 02:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (71 votes). Check out past polls.