Team:Warsaw/JSTest
From 2008.igem.org
(Difference between revisions)
Line 100: | Line 100: | ||
{ | { | ||
h3=new RegExp(/<h3.*>(.*)<\/h3>/ig); | h3=new RegExp(/<h3.*>(.*)<\/h3>/ig); | ||
- | + | title=removeHTMLTags(title); | |
var titles=ans.match(h3); | var titles=ans.match(h3); | ||
Line 108: | Line 108: | ||
{ | { | ||
var notags=titles[i].split(/(<h3>)|(<\/h3>)/i); | var notags=titles[i].split(/(<h3>)|(<\/h3>)/i); | ||
- | alert (removeHTMLTags(notags[3])); | + | //alert (removeHTMLTags(notags[3])); |
+ | var currtitle=removeHTMLTags(notags[3]); | ||
+ | if (currtitle==title) | ||
+ | { | ||
+ | if (i+1<titles.length) return ans.substring(ans.indexOf(titles[i]),ans.indexOf(titles[i+1])); | ||
+ | else return ans.substring(ans.indexOf(titles[i])); | ||
+ | } | ||
} | } | ||
} | } |
Revision as of 01:37, 26 October 2008
|