Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1003068 // extractIntsFromString

JavaX fragment (include)

static BigInteger[] extractIntsFromString(S s) {
  Pattern p = Pattern.compile("-?\\d+");
  Matcher m = p.matcher(s);
  List<BigInteger> list = new ArrayList<BigInteger>();
  while (m.find())
    list.add(new BigInteger(m.group()));
  return list.toArray(new BigInteger[list.size()]);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003068
Snippet name: extractIntsFromString
Eternal ID of this version: #1003068/1
Text MD5: 1c277c4ad2c16ecac3d19a59ee6833f9
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-04-27 15:52:15
Source code size: 293 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 711 / 680
Referenced in: [show references]