Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: knapsack problem solved by regex

by jwkrahn (Monsignor)
on Mar 15, 2010 at 18:19 UTC ( #828763=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    for ( keys %items ) {
  2. or download this
    for ( sort { $items{ $b }{ v } <=> $items{ $a }{ v } } keys %items ) {
  3. or download this
    for ( sort { $items{ $a }{ v } <=> $items{ $b }{ v } } keys %items ) {

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://828763]
[Discipulus]: ovedpo15 when you can use a regex anchor, use it. good morning btw
[ovedpo15]: good morning and thx. I forget to mention another thing: what if I need to check that my string is "hey" and ",0" for example "hey_how,0" is good. can I check it with one regex?
[ovedpo15]: I don't know what is between "hey" and ",0"

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2018-03-20 07:49 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (248 votes). Check out past polls.