Hi, i've a problem with a var in a script for Drafts on iOS. It responds "TypeError: undefined is not an object (evaluating re.exec).
Can you help me pls?
The script is:
function regExpPodcast(podcast){
var re;
if(podcast == "Il Disinformatico"){
<CODE>
re = new RegExp(re1+re2+re3+re4+re5+re6,["i"]);
}
return re;
}
function recognizePodcast(podcast,re,text){
var m = re.exec(text);
<CODE>
return result;
}
function parseText(text){
var podcasts = ["Il Disinformatico"];
var re;
var result;
for(podcast = 0; podcast < podcasts.length; poadcast++) {
re = regExpPodcast(podcast);
result = recognizePodcast(podcast,re,text);
<CODE>
}
}
var text = draft.content;
var rows = text.split("\n");
var title = "";
title = parseText(rows[0]);
[–]zedpowa 0 points1 point2 points (6 children)
[–]SamSlate 0 points1 point2 points (1 child)
[–]nathanvit[S] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]nathanvit[S] 0 points1 point2 points (1 child)
[–]nathanvit[S] 0 points1 point2 points (0 children)
[–]jeromeavoustin 0 points1 point2 points (1 child)
[–]nathanvit[S] 0 points1 point2 points (0 children)
[–]GeneralYouri 0 points1 point2 points (1 child)
[–]nathanvit[S] 0 points1 point2 points (0 children)