Libraryless. Click here for Pure Java version (2331L/15K).
1 | static int regexpCount(S pattern, S s) {
|
2 | Matcher m = regexp(pattern, s); |
3 | int n = 0; |
4 | while (m.find()) ++n; |
5 | ret n; |
6 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney
No comments. add comment
| Snippet ID: | #1024104 |
| Snippet name: | regexpCount - count number of matches in string |
| Eternal ID of this version: | #1024104/2 |
| Text MD5: | db68b7e724fb0cfdef269c4bc81a8d79 |
| Transpilation MD5: | eeeea68551a5dc1eb89aa10f8544cac8 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-03-22 13:06:36 |
| Source code size: | 127 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 393 / 539 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |