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

11
LINES

< > BotCompany Repo | #1001763 // tbSearch_simple - searches snippets (used to be just callde "search")

JavaX fragment (include)

// returns snippet IDs
static L<S> tbSearch_simple(S query) {
  S page = loadPage(tb_mainServer() + "/tb/search.php?q=" + urlencode(query));
    
  Matcher m = Pattern.compile(">(#\\d+)</a> - (.*?)<br>").matcher(page);

  new L<S> results;
  while (m.find())
    results.add(m.group(1));
  ret results;
}

Author comment

Began life as a copy of #1000778

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: #1001763
Snippet name: tbSearch_simple - searches snippets (used to be just callde "search")
Eternal ID of this version: #1001763/8
Text MD5: 52d8ea37af17fd12def09a6fef8cdd7f
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-10-13 15:21:01
Source code size: 316 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 778 / 980
Version history: 7 change(s)
Referenced in: [show references]