# ------------------------------ def attrListRE ws = %q{\s*} nm = %q{[a-zA-Z][-_:a-zA-Z0-9]*} dquot = %q{"[^"]*"} squot = %q{'[^']*'} value = %Q{#{dquot}|#{squot}} attr = %Q{(#{nm})#{ws}=#{ws}(#{value})#{ws}} Regexp.new(attr) end $attrListRE = attrListRE # ------------------------------ def xmlTokenRE ws = %q{\s*} nw = %q{[^\s]} nm = %q{[a-zA-Z][-_:a-zA-Z0-9]*} dquot = %q{"[^"]*"} squot = %q{'[^']*'} value = %Q{#{ws}#{dquot}|#{ws}#{squot}} attr = %Q{(?:#{nm}#{ws}(?:=(?:#{value})#{ws})?)} ec = %Q{/?>} tag = %Q{} pi = %Q{<[?](?:#{nm})(?:.|\n)*?>} text = %q{[^<]+} dtdDecl = %Q{} illegal = %q{.} token = tag + "|" + comment + "|" + pi + "|" + text + "|" + dtdDecl + "|" + illegal Regexp.new(token) end $xmlTokenRE = xmlTokenRE # ------------------------------