JWalker:
--------------------------------------------------------------------------------
Thank you for your help and patience.. I have tried to put the code in as a
Jscript but have not had any luck..  Any additional help is greatly
appreciated…
--------------------------------------------------------------------------------


You can play with the following attempt; the regular expression could be
adjusted in various ways (e.g. whitespace before the numbers ...)
As JavaScript RE works with multiline string (as opposed to PSPad working on
lines), the very first line and the others after newline characters must be
handled separately.

Currently the whole content of the active editor window is replaced, working on
the selection is also possible, see the scripting documentation 
 ... \PSPad\Script\readme.rtf

hth,
  vbr

cite:
--------------------------------------------------------------------------------
//// ... PSPad\script\JScript\removeStartingZeros.js ///
var module_name = "removeTrailingZeros";
var module_ver = "1";

function removeStartingZeros(){
if (editorsCount()<1){return;} // quit if no text window is open
var actEd = newEditor();
actEd.assignActiveEditor();
var inputTxt = actEd.text(); // get the whole text

// replace zeros from the very beginning of the line as long as no "." (dot)
follows
var outputTxt = inputTxt.replace(/(^|
)0+(?=[^.])/g, "$1");

actEd.text(outputTxt); // set the modified text content
}

function Init(){ // add menu items: label, group label, function, shortcut
addMenuItem("remove starting zeros", "",
"removeStartingZeros","Ctrl+Alt+Shift+Z");
}

--------------------------------------------------------------------------------


-- 
<http://forum.pspad.com/read.php?2,50391,50462>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem