It's possible you could approach the problem more simply, maybe like this:
starting from every instance of </fh> start gathering all text except anything that looks like a tag (ie. discard all tags) up until the point where you find an instance of </location_addr1>. You're then situated where you have the desired text (sans tags) and you know exactly where you are, so you should be able to utter (that part of) your record with the desired format. In other words, instead of rewriting just the damaged records, rewrite ALL the records. ...just a thought, based only upon the info supplied, FWIW, YMMV, etc... _______________________________________________ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss