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

Re: My regex is too greedy!

by kelan (Deacon)
on Mar 05, 2003 at 18:12 UTC ( [id://240646]=note: print w/replies, xml ) Need Help??


in reply to My regex is too greedy!

Why not just:

my $user = (split(/ +/, $message))[12];
or something similar, depending on how you've done the previous splits. This should work as long as the message is in a standard format.

kelan


Perl6 Grammar Student

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (1)
As of 2024-04-18 23:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found