On Sat, Mar 31, 2007 at 12:34:25AM +0900, Jon wrote: > <SUBEVENTSTATUS > 1:2><OPERATIONNAME></OPERATIONNAME>gofast<OPERATIONSTATUS>stopped</OPERATIONSTATUS><TARGETOBJECTNAME>name</TARGETOBJECTNAME><TARGETOBJECTVALUE>val</TARGETOBJECTVALUE></SUBEVENTSTATUS > 1:1><SUBEVENTSTATUS 2:2><......and on > > REXML pukes on the <SUBEVENTSTATUS 1:2> tag... which it should. There > should be some kind of attribute declaration instead. I want to > translate it to something like this: <SUBEVENTSTATUS no="1" of="2"> > > I'm trying to make a regex to detect the funny tags. Here is what I have > so far: > > xml_fix=/<(\S+)\s+(\d+):(\d+)>/ > > This is great, but it will match this: > > <Request><code_set_list 1:2> > > instead of just this: > > <code_set_list 1:2> Try (\w+) instead of (\S+)