From: TAKAHASHI Masayoshi Date: 2001-11-21T20:14:21+09:00 Subject: [ruby-talk:26002] Re: REXML parser bug(?) Hi, Tobias Reif wrote: > > The script to parse string with REXML::Document, > > > > require 'rexml/document' > > doc = REXML::Document.new("") > > doc.write(STDOUT) > > > > returns: > > > > > > > really? where does the '2' come from? Oops, sorry. I've copy&pasted old script. Correct sample is: require 'rexml/document' doc = REXML::Document.new("") doc.write(STDOUT) I think regex pattern in rexml/attribute.rb (line 15) > PATTERN = /\s*([\w-]*:?[\w-]+)\s*=\s*["\'](.*?)["\']/m causes this behavior. Regards, TAKAHASHI Masayoshi (maki@inac.co.jp)