Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Regexp help

by frozenwithjoy (Curate)
on Nov 22, 2012 at 01:02 UTC ( #1005034=note: print w/ replies, xml ) Need Help??


in reply to Regexp help

Why not use split?

$ perl -E '$string = "0.740234|0.758789|0.748047|0.749023|0.748047|0.7 +54883|0.743164|0.748047|0.780273|0.739258|0.765625|0.761719|0.760742| +||||0.75293|0.742188"; say $_ for (split /\|/, $string); ' 0.740234 0.758789 0.748047 0.749023 0.748047 0.754883 0.743164 0.748047 0.780273 0.739258 0.765625 0.761719 0.760742 0.75293 0.742188

NOTE: Keep in mind that when matching | in split (or another regex situation), you need to escape it: \|


Comment on Re: Regexp help
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-07-11 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (221 votes), past polls