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

15
LINES

< > BotCompany Repo | #1012189 // regexpGetGroups - get groups from Matcher as list (does not include full match)

JavaX fragment (include)

static L<S> regexpGetGroups(Matcher matcher) {
  int n = matcher.groupCount();
  new L<S> l;
  for (int i = 1; i <= n; i++)
    l.add(matcher.group(i));
  ret l;
}

// performs find()
static L<S> regexpGetGroups(S pat, S s) {
  Matcher m = regexpMatcher(pat, s);
  if (m.find())
    ret regexpGetGroups(m);
  null;
}

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: #1012189
Snippet name: regexpGetGroups - get groups from Matcher as list (does not include full match)
Eternal ID of this version: #1012189/3
Text MD5: 50c4f1f5f252b183988d12d179d43ed3
Author: stefan
Category: javax / regexp
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-10 14:54:18
Source code size: 330 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 417 / 540
Version history: 2 change(s)
Referenced in: [show references]