Parsing text to some array

hello,

i would like to parse plain text from http request to create rss feed for it (https://www.ietf.org/rfc/rfc-index-latest.txt)

9184 BGP Extended Community Registries Update. C. Loibl. January 2022.
(Format: HTML, TXT, PDF, XML) (Updates RFC7153, RFC8955) (Status:
PROPOSED STANDARD) (DOI: 10.17487/RFC9184)

9186 Fast Failover in Protocol Independent Multicast - Sparse Mode
(PIM-SM) Using Bidirectional Forwarding Detection (BFD) for
Multipoint Networks. G. Mirsky, X. Ji. January 2022. (Format: HTML,
TXT, PDF, XML) (Status: PROPOSED STANDARD) (DOI: 10.17487/RFC9186)

9187 Sequence Number Extension for Windowed Protocols. J. Touch. January
2022. (Format: HTML, TXT, PDF, XML) (Status: INFORMATIONAL) (DOI:
10.17487/RFC9187)

and so on… how can i do it? any hints appreciated

i am using self-hosted version

hi @saint

I think you are looking for the split method.
https://www.w3schools.com/jsref/jsref_split.asp

you can then use the linebreak characters to split on those white lines you got there.
https://www.loginradius.com/blog/async/eol-end-of-line-or-newline-characters/

so something like split("\n") or split("\r\n")

1 Like