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

Re: Need a regex

by plaid (Chaplain)
on Jun 09, 2000 at 01:22 UTC ( #17219=note: print w/replies, xml ) Need Help??


in reply to Need a regex

If this is the general format of the lines you need to extract data from, it appears what you're looking for is just the third field delimited by whitespace. This should work:
my $string = "USD_ABD DOLARI 608,132 611,064 607,70 +6 611,981 1.0 1.0"; my $value = (split /\s+/, $string)[2];
Which leaves $value with 608,132.

Replies are listed 'Best First'.
RE: Re: Need a regex
by sinan (Sexton) on Jun 09, 2000 at 01:26 UTC
    Thanks a lot, friar plaid!!!

    This really saved me a lot of trouble.
    Cheers,
    Sinan

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2022-01-27 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?