this post was submitted on 29 Feb 2024
338 points (96.2% liked)

linuxmemes

20758 readers
1036 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 6 months ago* (last edited 6 months ago) (1 children)

I guess it depends on your definition of "parse", but let me tell you it's still very painful to deal with things like attributes appearing in any order inside of a tag so I definitely am not advocating to use regex to "read" (or whatever you want to call it) HTML.

[–] fuckwit_mcbumcrumble 3 points 6 months ago* (last edited 6 months ago)

My regex at work is full of (<[^>]+\s*){0,5} because we don’t care about 90 percent of the attributes. All we care is it’s class=“data I want” and eventually take me to that data.