Regular Expressions 101

Community Library Entry

0

Regular Expression
Python

r'''
< ([a-z]+ #tag name ( #attributes begin \s+[a-z]+\s*= #attribute name \s*("([^"\\]|\\.)*"|\'([^\'\\]|\\.)*\') #attribute value is a quoted string )*\s* #attributes end /? #can close single tag | #or /[a-z]+) #closing tag >
'''
gix

Description

html tags with attributes

Submitted by anonymous - 6 years ago