Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: Problems with formatting the results of my regex (\.)

by tye (Cardinal)
on Jul 07, 2012 at 07:16 UTC ( #980453=note: print w/ replies, xml ) Need Help??


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

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        


Comment on Re^4: Problems with formatting the results of my regex (\.)
Select or Download Code
Re^5: Problems with formatting the results of my regex (\.)
by monsoon (Pilgrim) on Jul 07, 2012 at 07:41 UTC
    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.

Log In?
Username:
Password:

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

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

    How do you remember the number of days in each month?











    Results (56 votes), past polls