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

16
LINES

< > BotCompany Repo | #1016974 // words2_notNextToNumbers - deeply extract all words from string; filters out at least some of the hex strings

JavaX fragment (include)

static L<S> words2_notNextToNumbers(S s) {
  new L<S> l;
  int n = l(s);
  for (int i = 0; i < n; ) {
    if (isDigit(s.charAt(i))) continue with ++i;
    int j = i;
    while (j < n && isLetter(s.charAt(j)))
      ++j;
    if (j < n && isDigit(s.charAt(j))) continue with i = j;
    if (j > i) l.add(substring(s, i, j));
    while (j < n && !isLetter(s.charAt(j)))
      ++j;
    i = j;
  }
  ret l;
}

Author comment

Began life as a copy of #1016968

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016974
Snippet name: words2_notNextToNumbers - deeply extract all words from string; filters out at least some of the hex strings
Eternal ID of this version: #1016974/4
Text MD5: a6f02101ef029a3336a3cdaf0fc0ec7b
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-09 16:39:44
Source code size: 417 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 284 / 325
Version history: 3 change(s)
Referenced in: [show references]