I would like to revoke line breakes within the text element of an XML file with a simple script to accelerate such work.
But it deletes as well the entire entry. How can I preserve the text here.
But it deletes as well the entire entry. How can I preserve the text here.
Code:
if (UltraEdit.document.length > 0) // Is any file opened?{ // Define the parameters for a case-sensitive Perl regular expression // replace all and run the replace on entire file. UltraEdit.perlReOn(true); UltraEdit.activeDocument.findReplace.regExp=true; UltraEdit.activeDocument.findReplace.replace("<DESCRIPTION_SHORT>([^<]*)\n([^<]*)</DESCRIPTION_SHORT>","<DESCRIPTION_SHORT>\1 \2</DESCRIPTION_SHORT>"); UltraEdit.activeDocument.findReplace.replace("<MANUFACTURER_TYPE_DESCR>([^<]*)\n([^<]*)</MANUFACTURER_TYPE_DESCR>","<MANUFACTURER_TYPE_DESCR >\1 \2</MANUFACTURER_TYPE_DESCR>");}
statistics: Posted by Estanislao — 16:33 - 1 day ago — Replies 1 — Views 137