@ -16,30 +16,9 @@ function split(text) { // Function to split lines into array
returntext.split(/\r?\n/);
returntext.split(/\r?\n/);
}
}
functionfindPattern(text){// Test entries against 8 patterns. If matches pattern returns true
constnodnospatt=/^\s{0,2}-\s\[.*?\]\(.*?\) - .{0,249}?\. `.*?` `.*?`/;// Regex for entries with no demo and no source code
constslpatt=/^\s{0,2}-\s\[.*?\]\(.*?\) - .{0,249}?\. \(\[Demo\b\]\(.*?\), \[Source Code\b\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with demo and source code
constnodpatt=/^\s{0,2}-\s\[.*?\]\(.*?\) - .{0,249}?\. \(\[Source Code\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with no demo
constnospatt=/^\s{0,2}-\s\[.*?\]\(.*?\) - .{0,249}?\. \(\[Demo\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with no source code
constpnodnospatt=/^\s{0,2}-\s\[.*?\]\(.*?\) `⚠` - .{0,249}?\. `.*?` `.*?`/;// Regex for entries with proprietary with no demo and no source code
constpslpatt=/^\s{0,2}-\s\[.*?\]\(.*?\) `⚠` - .{0,249}?\. \(\[Demo\b\]\(.*?\), \[Source Code\b\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with proprietary with demo and source code
constpnodpatt=/^\s{0,2}-\s\[.*?\]\(.*?\) `⚠` - .{0,249}?\. \(\[Source Code\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with proprietary with no demo
constpnospatt=/^\s{0,2}-\s\[.*?\]\(.*?\) `⚠` - .{0,249}?\. \(\[Demo\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with proprietary with no source code
if(nodnospatt.test(text)===true){
returntrue;
}elseif(slpatt.test(text)===true){
returntrue;
}elseif(nodpatt.test(text)===true){
returntrue;
}elseif(nospatt.test(text)===true){
returntrue;
}elseif(pnodnospatt.test(text)===true){
returntrue;
}elseif(pslpatt.test(text)===true){
returntrue;
}elseif(pnodpatt.test(text)===true){
returntrue;
}elseif(pnospatt.test(text)===true){
functionfindPattern(text){// All entries should match this pattern. If matches pattern returns true.