• @BluesF@lemmy.world
    link
    fedilink
    154 months ago

    I don’t think that using regex to basically do regex stuff on strings that happen to also be HTML really counts as parsing HTML

    • @Breve@pawb.social
      link
      fedilink
      5
      edit-2
      4 months ago

      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@lemmy.world
        link
        fedilink
        3
        edit-2
        4 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.