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

7
LINES

< > BotCompany Repo | #2000489 // matchAll

New Tinybrain snippet [tags: archive]

  static List<String> matchAll(String pattern, String text) {
    List<String> matches = new ArrayList<String>();
    Matcher matcher = Pattern.compile(pattern).matcher(text);
    while (matcher.find())
      matches.add(matcher.group());
    return matches;
  }

download  show line numbers   

Snippet is not live.

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

No comments. add comment

Snippet ID: #2000489
Snippet name: matchAll
Eternal ID of this version: #2000489/1
Text MD5: 700c6ee22c95c535ca3f9219deaf67cb
Author: stefan
Category:
Type: New Tinybrain snippet
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-08-02 19:55:47
Source code size: 268 bytes / 7 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 570 / 511
Referenced in: [show references]