Team:Warsaw/JSTest

From 2008.igem.org

(Difference between revisions)
Line 101: Line 101:
h3=new RegExp(/<h3.*>(.*)<\/h3>/i);
h3=new RegExp(/<h3.*>(.*)<\/h3>/i);
 +
 +
var titles=ans.match(h3);
 +
for (var i=0;i<titles.length;i++)
 +
{
 +
if (!titles[i]==undefined)
 +
{
 +
var notags=removeHTMLTags(trimStr(titles[i]));
 +
if (notags.search(removeHTMLTags(trimStr(title))>0) return "Hit: "+titles[i];
 +
}
 +
}
 +
 +
/*
var topics=ans.split(h3);
var topics=ans.split(h3);
-
alert(ans.match(h3));
 
for (var i=0;i<topics.length;i++)
for (var i=0;i<topics.length;i++)
{
{
if (removeHTMLTags(trimStr(topics[i]))==removeHTMLTags(trimStr(title))) return topics[i+1];
if (removeHTMLTags(trimStr(topics[i]))==removeHTMLTags(trimStr(title))) return topics[i+1];
}
}
 +
*/
return "Search Error";
return "Search Error";

Revision as of 01:21, 26 October 2008

Gallery Bricks Notebook Team Project Home