RegEx for extracting HTML Image properties

前端 未结 6 1494
走了就别回头了
走了就别回头了 2021-01-28 12:02

I need a RegEx pattern for extracting all the properties of an image tag.

As we all know, there are lots of malformed HTML out there, so the pattern has to cover those p

6条回答
  •  攒了一身酷
    2021-01-28 12:48

    As we all know, there are lots of malformed HTML out there, so the pattern has to cover those possibilities.

    It won't. Use a HTML parser if you have to parse "evil" (from an unknown source) HTML.

提交回复
热议问题