Created
August 19, 2016 10:47
-
-
Save nipotan/cce668bcb6afd7db002815fef69bd929 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < questionArr.length; i++) { | |
var qa = $.grep(questionArr[i].split(/\n/), function(n){ | |
return n !== '' && ! n.match(/^\(0\)/); | |
}); | |
qa[0] = qa[0].replace(/^(.+)_(ANT|SYN)$/, function(){ | |
return '「' + RegExp.$1 + '」の' + (RegExp.$2 === 'ANT' ? '対' : '類') + '義語は'; | |
}); | |
qa[1] = qa[1].replace(/^\(1\)(.+)/,'「$1」'); | |
console.log(qa.join('')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment