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: 730 / 924
Version history: 7 change(s)
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1002569 - search2 - searches snippets, returns ids and names
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000188 - Answer for stefanreich(>> t search)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)