Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Help with regex, how to get the largest integer in a string?

by MaxKlokan (Monk)
on Apr 19, 2007 at 08:45 UTC ( #610914=note: print w/replies, xml ) Need Help??


in reply to Re: Help with regex, how to get the largest integer in a string?
in thread Help with regex, how to get the largest integer in a string?

Just a question: What is the lookahead needed for?
It seems to mee that
my @arr = split /(\D+)/, $s;
works as well.
Max
  • Comment on Re^2: Help with regex, how to get the largest integer in a string?
  • Download Code

Replies are listed 'Best First'.
Re^3: Help with regex, how to get the largest integer in a string?
by naikonta (Curate) on Apr 19, 2007 at 14:31 UTC
    Whenever split() will do, I avoid regex. ++

    Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

        My understanding of split is for the whole thing about it, including of course that pattern being the first argument. Likewise, my statement referred to the comparison between regex- and split-based solution despite that a pattern being used in split.

        Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2020-10-23 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (234 votes). Check out past polls.

    Notices?