• Breve@pawb.social
    link
    fedilink
    arrow-up
    0
    ·
    7 months ago

    I use regex in SQL to parse HTML stored in a database. It can’t universally parse and validate every HTML document, but it can still be used to find specific data like pulling out every link.

    • BluesF@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      7 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
        arrow-up
        0
        ·
        edit-2
        7 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.