[Jprogramming] Power Conjunction
'Michael Day' via Programming
programming at jsoftware.com
Sun Mar 6 17:13:18 UTC 2022
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
More information about the Programming
mailing list