Join Nostr
2025-05-04 18:59:06 UTC
in reply to

John Gruber on Nostr: nprofile1q…c73ne I should have followed up on my own. The problem had nothing to do ...

I should have followed up on my own. The problem had nothing to do with my regex. My regex HTML parsing mojo is second-to-none.

<title\b[^>]*>(.+?)</title>

The problem is, when the HTML source contains 40 <title> elements, the regex search action returns an array with 40 elements, and is created the shortcut years ago with the goofy assumption that a web page would only ever have one <title> element.