Monday, 15 September 2014

string - Haskell "abc123de45" to [123,45] -


Like

"abc123def45", I want to get -> [123, 45] from the string.

I now have the following:

  getDecimals :: string - & gt; [EIT] getDecimals xs = [number TTI x | X & lt; -xs, isDigit x]  

Only this method is coming back -> [1,2,3,4,5].

How can I do this?

Tnx!

if you are using Data.List split you do this You can.

  Import data List Import import data Buyer's Dissimms :: String - & gt; [Int] getDecimals = Read the map. Words (without .isdigit)  

No comments:

Post a Comment