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

13
LINES

< > BotCompany Repo | #1013198 // Get list of chemistry terms from Wikipedia - see chemistryTermsFromWikipedia

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (5124L/34K).

!7

p {
  S page = loadPage("https://en.wikipedia.org/wiki/Glossary_of_chemistry_terms?action=raw");
  for (S line : lines(page)) {
    L<S> l = regexpFirstGroups(regexpQuote("*'''[[") + "(.+?)" + regexpQuote("]]'''") + "(.*)", line);
    if (nempty(l)) {
      S term = dropStuffBeforeVerticalBar(first(l)), def = second(l);
      L<S> defs = nempties(splitAt(def, "{{snd}}"));
      print("Term found: " + quote(term) + " - " + sfu(defs));
    }
  }
}

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: #1013198
Snippet name: Get list of chemistry terms from Wikipedia - see chemistryTermsFromWikipedia
Eternal ID of this version: #1013198/8
Text MD5: 36f23249fb46024cda510bd08ca04aa0
Transpilation MD5: 4eeccea7782d5fe1f656321b5ef41ea8
Author: stefan
Category: javax / networking
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-28 19:12:57
Source code size: 465 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 364 / 817
Version history: 7 change(s)
Referenced in: [show references]