Libraryless. Click here for Pure Java version (10768L/59K).
1 | static BigInteger[] extractNonNegativeIntsFromString(S s) {
|
2 | Pattern p = compileRegexp("\\d+");
|
3 | Matcher m = p.matcher(s); |
4 | new L<BigInteger> list; |
5 | while (m.find()) |
6 | list.add(new BigInteger(m.group())); |
7 | return list.toArray(new BigInteger[list.size()]); |
8 | } |
Began life as a copy of #1003068
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
| Snippet ID: | #1036632 |
| Snippet name: | extractNonNegativeIntsFromString |
| Eternal ID of this version: | #1036632/1 |
| Text MD5: | bbc273946eca0dab908273d17177798b |
| Transpilation MD5: | 5b0978761b82f419a07b36922b9fff22 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2023-07-08 01:24:28 |
| Source code size: | 271 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 352 / 447 |
| Referenced in: | [show references] |