I forgot about regular expressions in J, but not familiar with them anyway! Used to know them in unix, once upon a time. Yr commas much better, too.
M On 06/03/2022 17:02, Raul Miller wrote:
Here's a version of getoeisseries which only returns direct hits and not cross references: NB. install 'web/gethttp' require'regex web/gethttp' OEIS =: 'http://oeis.org/search?q=' NB. fails with https://... ! getoeisseries=: {{ a0=. I.'<a 'E.RAW=:gethttp OEIS,commas y a1=. I.'</a>'E.RAW A=. ,{."1'href="/A\d{6}"'rxmatches RAW a=. RAW{L:0~(a0(+i.)&.>a1-a0){~<:a0 I.A keep=. -.(1: e. ' title=' E. ])S:0 a >(}.~1+i.&'>')&.> keep#a }} commas=: rplc&' ,_-'@": FYI,
-- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm