Find all attributes and their values within a HTML string

To get all attributes and their values from a HTML string where all attribute values are correctly embraced by double quotes you can use the following:

(?<tagname>[^\s]*)="(?<tagvalue>[^"]*)"

Regular Expressions, blog | Comments | Trackback

comments

No comments yet.

Leave a comment