Capturing Multiple, Optional HTML Attribute Values
Wednesday, August 15th, 2007 • Related • Filed Under
Let's say you wanted to find all <div> tags, and capture their id and class attribute values. Anyone who's spent much time parsing HTML with regular expressions is probably aware that it can get quite tricky to match or capture multiple, specific attribute values with one regex, considering that the regex needs to allow for […]