This is a little off topic, but I figured there's a few 
[emacs|vi|perl|sed] people here that could help me out.

I have an xml file with lines like this:
example line:  <field 
type="string">value</field><orig_field>value</orig_field>
basicly it's storing fields with their datatypes and original values.  I 
need to search this file for lines that the values match (or don't match).
here's my regexp:  /<(.*) type=\".*\">((.|\n)*)<\/\1><orig_\1>\2<\/orig_\1>/
I need to do this in 3 languages (javascript, vbscript-asp, and php)

My problem is with multi line data, I can match the multiline initialy, 
but the "\2" won't work with it, but if it's all on one line it works fine.
e.g.:
regexp: /<(.*) type=\".*\">((.|\n)*)<\/\1><orig_\1><\/orig_\1>/
matches: <field type="string">value
value</field><orig_field></orig_field>

regexp: /<(.*) type=\".*\">((.|\n)*)<\/\1><orig_\1>\2<\/orig_\1>/
doesn't match: <field type="string">value
value</field><orig_field>value
value</orig_field>

Any idea on what I'm doing wrong?  Thanks in advance for the help.
Chris Frederick



_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list