This topic has been discontinued.
See:
http://www.donationcoder.com/forum/index.php?topic=17153.0
See:
http://www.donationcoder.com/forum/index.php?topic=17153.0


regexstr="^df (.*?),$";
scriptregex=/^df (.*?),$/;To:regexstr="^df (.*?) $";
scriptregex=/^df (.*?) $/;
I will change it to the space as well 



// plugin script :
displayname="ninjawords.com";
versionstring="1.0.0";
releasedatestring="21.2.2008";
author="nod5 (based on Definr plugin by Oldrich Svec)";
updateurl="";
homepageurl="";
shortdescription="ninjawords.com";
longdescription="defines words through http://ninjawords.com";
advconfigstring="ninjawords.com";
readmestring="ninjawords.com";
iconfilename="";
aliasstr="nw";
regexstr="^nw (.*?) $";
scriptregex=/^nw (.*?) $/;
regexfilterstr="";
keywordstr="";
scorestr="300";
// type
UNKNOWN=0; FILE=1; FOLDER=2; ALIAS=3; URL=4; PLUGIN=5; CLIP=5;
// Postprocessing
IMMEDIATE_DISPLAY=0; ADDSCORE=1; MATCH_AGAINST_SEARCH=2;
// search state
STOPPED=0; SEARCHING=1;
var pre_string = "{\\rtf1\\ansi\\ansicpg1250\\deff0\\deftab709{\\fonttbl{\\f0\\fnil\\fcharset0 Arial;}}{\\colortbl ;\\red255\\green0\\blue0;}{\\*\\generator Msftedit 5.41.15.1507;}\\viewkind4\\uc1\\pard\\lang2057\\f0\\fs18 ";
var post_string = "\\par\n}";
function doQuery(querykey,querynokeyword){
var url = "http://ninjawords.com/"+querynokeyword;
var xmlhttp=new ActiveXObject("MSXML2.XMLHTTP");
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4) {
var string = xmlhttp.responseText;
string = string.replace(/\n/g,'\\par');
var splitString = string.split('<dt class="title-word">');
var string ="";
for ( var i=1, len=splitString.length; i<len; ++i ){
if (i > 1) {
string +="\\par -----------------------------\\par ";
}
splitString[i] = splitString[i].replace(/<\/dl>.*?$/,"");
splitString[i] = splitString[i].replace(/<dd.*?>/g,'\\doublepar ');
splitString[i] = splitString[i].replace(/ :<\/span>/g,": ");
splitString[i] = splitString[i].replace(/more»/g,'');
splitString[i] = splitString[i].replace(/—/g,'-');
splitString[i] = splitString[i].replace(/<.*?>/g,"");
splitString[i] = splitString[i].replace(/\t/g,'');
splitString[i] = splitString[i].replace(/\\par\s*?(\S)/g,'\\par$1');
splitString[i] = splitString[i].replace(/\\par/g,'');
splitString[i] = splitString[i].replace(/\\doublepar/g,'\\par\\par');
string += splitString[i];
}
FARR.setStrValue("statusbar","Define");
FARR.setStrValue("window.richeditmode",pre_string+string+post_string);
}
}
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function onSearchBegin(querykey, explicit, queryraw, querynokeyword) {
if(!explicit) {
if(aliasstr.indexOf(querynokeyword)!=-1) {
FARR.setState(querykey,1);
FARR.emitResult(querykey,aliasstr, aliasstr, iconfilename,ALIAS,IMMEDIATE_DISPLAY,300);
FARR.setState(querykey,0);
}
return;
}
FARR.setStrValue("statusbar","Define");
FARR.setStrValue("window.richeditmode",pre_string+"Type what you want to search and hit Space"+post_string);
}
function onRegexSearchMatch(querykey,querynokeyword) {
FARR.setStrValue("statusbar","Define");
FARR.setStrValue("window.richeditmode",pre_string+"Please wait..."+post_string);
var match_reg = querynokeyword.match(scriptregex);
doQuery(querykey,match_reg[1]);
}
I will use this website instead function doQuery(querykey,querynokeyword){
var output="";
var url = "http://ninjawords.com/"+querynokeyword;
var xmlhttp=new ActiveXObject("MSXML2.XMLHTTP");
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4) {
var string = xmlhttp.responseText;
string = string.replace(/\n|\t/g,'');
string = string.match(/<dl class="word" id="word-.*?">.*?<\/dl>/g);
for(k=0;k<string.length;k++){
heading = string[k].match(/<dt class="title-word">.*?<a href=.*?>(.*?)<\/a>.*?<\/dt>/);
if(heading && heading[1])
output += "\\b "+heading[1]+"\\b0\\par\\par\n";
var body = string[k].match(/<dd class="entry.*?">.*?<\/dd>/g);
if(body)
for(i = 0;i<body.length;i++){
body = body.replace(/<a title="synonyms">more»<\/a>/g,"");
output += body.replace(/<.*?>/g,"")+"\\par\\par\n";
}
else output = "Nothing found";
}
FARR.setStrValue("statusbar","Define");
FARR.setStrValue("window.richeditmode",pre_string+output+post_string);
}
}
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
So I am not the right person to revise your code
But it works perfectly 



<?xml version="1.0" encoding="windows-1250"?>
<feed>
<match what="<span style="font-size:1\.2em">(.*?)<\/span>">
<couple>
<first>
<match what="<strong>(.*?)</strong>">
</match>
</first>
<second>
<match what="</b>(.*?)<b>" modifiers="g">
<replace what="<.*?>" with="">
</replace>
</match>
</second>
</couple>
</match>
<match what="<table cellpadding=0 cellspacing=0 border=0>(.*?)</table>">
<match what="<td align=left valign="top" width="30%">(.*?)</td>" modifiers="g">
<couple>
<first what="<strong>(.*?)</strong>">
</first>
<second what="</b>(.*?)<b>" list="list">
<replace what="<.*?>" with="">
</replace>
</second>
</couple>
</match>
</match>
</feed>and it would display a content to you. But it seams as complex problem and I am not sure, I have enough skills to code it...function doQuery(querykey,querynokeyword){
var url = "http://ninjawords.com/"+querynokeyword;
var xmlhttp=new ActiveXObject("MSXML2.XMLHTTP");
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4) {
var string = xmlhttp.responseText;
string = string.replace(/\n|\t/g,'');
var splitString = string.split('<dt class="title-word">');
var string ="";
for (var i=1;i<splitString.length; ++i){
if (i > 1) {
string +="\\par -----------------------------\\par ";
}
splitString[i] = "\\b " + splitString[i]
splitString[i] = splitString[i].replace(/<\/dl>.*?$/,"");
splitString[i] = splitString[i].replace(/<dd.*?>/g,'\\b0 \\par\\par ');
splitString[i] = splitString[i].replace(/ :<\/span>/g,": ");
splitString[i] = splitString[i].replace(/more»/g,'');
splitString[i] = splitString[i].replace(/—/g,'-');
splitString[i] = splitString[i].replace(/<.*?>/g,"");
string += splitString[i];
}
FARR.setStrValue("statusbar","Define");
FARR.setStrValue("window.richeditmode",pre_string+string+post_string);
}
}
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
Thanks for pointing out 




function doQuery(querykey,querynokeyword){
var url = "http://ninjawords.com/definitions/getdef/"+querynokeyword;
var xmlhttp=new ActiveXObject("MSXML2.XMLHTTP");
xmlhttp.onreadystatechange = function(){
if (xmlhttp.readyState == 4) {
var string = xmlhttp.responseText;
string = string.replace(/\\n|\\t/g,'');
var splitString = string.split('\\074dt class=\\"title-word\\"\\076');
var string ="";
for (var i=1;i<splitString.length; ++i){
if (i > 1) {
string +="\\par -----------------------------\\par ";
}
splitString[i] = "\\b " + splitString[i];
splitString[i] = splitString[i].replace(/", query: ".*?$/,"");
splitString[i] = splitString[i].replace(/\\074dd.*?\\076/g,'\\b0 \\par\\par ');
splitString[i] = splitString[i].replace(/ :\\074\/span\\076/g,": ");
splitString[i] = splitString[i].replace(/\\074div class=\\"examples\\"\\076/g,"\. ");
splitString[i] = splitString[i].replace(/\\074.*?\\076/g,"");
splitString[i] = splitString[i].replace(/\\u2014/g,"-");
splitString[i] = splitString[i].replace(/\\u2019/g,"'");
splitString[i] = splitString[i].replace(/&mdash/g,"-");
splitString[i] = splitString[i].replace(/more»\,/g,"");
string += splitString[i];
}
FARR.setStrValue("statusbar","Define");
FARR.setStrValue("window.richeditmode",pre_string+string+post_string);
}
}
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
Is it only you programming FARR? I wonder is FARR opensource, so that anybody can help a little? 
most of my big programs aren't. it's something i'd like to do more of once i can convince myself it wouldn't make donations go from very little to even less 


Original address: https://www.donationcoder.com/forum/index.php?topic=12350.0