[texworks] Qtscripts help
kap4lin
kap4lin at gmail.com
Fri Jan 15 20:02:07 CET 2010
This may not the be appropriate list to ask for Qtscript help, so my
apologies ahead.
I am trying to replace the newline character by a space. Why does the
following not work?
var txt = TW.target.selection;
txt = txt.replace(/\n/g,' ');
TW.target.insertText(txt);
undefined;
I've also tried, txt.replace(/(.*)\n(.*)/g, "$1 $2"). Tried with \\n,
\\r, \r\n, \\n\\r, .. all sensible combination! The replace(...) does
not work inside the debugger itself!!
--
Regards
Kap4Lin
--------------------------------------
http://counter.li.org #402424
More information about the texworks
mailing list