1
edit
Changes
m
'''\s+''' - one or more (??) blank spaces, tabs, end of line, and others whitespace elements '''([\w\.]+)''' - one or more alphanumeric characters and/or(??) a dot '''\s+''' - more of the same '''(\"(?:[^\"]*\")|(?:\'[^\']*)\')''' - difficult part if the left of '|' matches ,the right part doesn't get analyzed * ''(\"(?:[^\"]*\")'' - matching something in between " and " * (?:[^\"]* \") - '''I'M NOT SURE OF THIS PART'''everything after "?:" if matched cannot be referenced not a backslash or a " - the * indicate zero or more - RIGHT??? ''(?:\'[^\']*)\')'' - the right side of the difficult reg. expression * '''\s*''' - none or more(??) white characters '''re.S''' - makes the dot to match even new lines - it is like raising DOTALL flag
* '' "<!ENTITY colorsDialog.title "Colors">''"
formatting regular expressions
* An analysis of regular expression, specific to DTDs (from Parser.py)
self.key = re.compile('<!ENTITY\s+([\w\.]+)\s+(\"(?:[^\"]*\")|(?:\'[^\']*)\')\s*>', re.S)
A matching line:
=== Related regular expressions theory ===