I thought more on something like this:
FROM:
from:
Quote:
http://rogerpilon.com/pierre/2009/02/enfin_un_formulaire_dinscription.html
more_text_here
http://rogerpilon.com/pierre/2009/02/
enfin_un_formulaire_dinscription.html more_text_here
I read the_search_and replace_strings list but I admit, it is out of my league.
Could_someone be kind enough_to post_the search/replace stings?
Thanks in advance!
.
.
TO:
from:
Quote:
http://rogerpilon.com/pierre/2009/02/enfin-un-formulaire-dinscription.html
more_text_here
http://rogerpilon.com/pierre/2009/02/
enfin-un-formulaire-dinscription.html more_text_here
I read the_search_and replace_strings list but I admit, it is out of my league.
Could_someone be kind enough_to post_the search/replace stings?
Thanks in advance!
.
.
.
USE a script like this:
(make COPIES of your files first!)module_name = "Stefan20131109001";
module_ver = "0.001";
function Init(){addMenuItem("Replace _ with - in URLs", "STEFANs JS sample",
"doit");}
function doit() {
var myObject = newEditor();
myObject.assignActiveEditor();
myText = myObject.Text();
//join all lines:
worktext = myText.replace(/\n/g,"000myLineBreak000");
//split into lines with URL only at HTTP and HTML:
worktext = worktext.replace(/http/ig,"\nhttp");
worktext = worktext.replace(/html/ig,"html\n");
//proceed on each line with HTTP in it:
out="";
LinesArray = worktext.split("\n");
for(x=0,L=LinesArray.length; x<L; x++){
line = LinesArray[x];
result = line.search(/http/i);
if (result != -1) {
out += line.replace(/_/g, "-");
}else{
out += line;
}
}
//Output:
//join lines:
out = out.replace(/\n/g);
//break at orign line breaks:
out = out.replace(/000myLineBreak000/g, "\n");
myObject.text(out);
//myObject.closeFile();
}
.
.
.
--
greets, Stefan
[img]http://pspad.milten.lima-city.de/Fan.gif[/img] (pleased user since 1722)
[url=http://tinyurl.com/52xrj]inofficial FAQs[/url] +
[url=http://forum.pspad.com/read.php?2,16286,page=2]Infos[/url] +
[url=http://forum.pspad.com/read.php?6,24628]Special Settings[/url]
<http://forum.pspad.com/read.php?2,61485,61491>
PSPad freeware editor http://www.pspad.com